Posted on Leave a comment

A Penny Saved is a Ton of Serverless Compute Earned

Scott Guthrie recently shared one of my favorite anecdotes on his Azure Red Shirt Tour. A Microsoft customer regularly invokes 1 billion (yes, that’s with a “B”) Azure Functions per day. The customer reached out to support after the first month thinking there was a bug in the billing system, only to find out that the $72 was in fact correct. How is that possible? Azure Functions is a serverless compute platform that allows you to focus on code that only executes when triggered by events, and you only pay for CPU time and memory used during execution (versus a traditional web server where you are paying a fee even if your app is idle). This is called micro-billing, and is one key reason serverless computing is so powerful.

Curious about Azure Functions? Follow the link https://aka.ms/go-funcs to get up and running with your first function in minutes.

Scott Guthrie Red Shirt

Scott Guthrie on the Azure Red Shirt Tour

In fact, micro-billing is so important, it’s one of three rules I use to verify if a service is serverless. There is not an official set of rules and there is no standard for serverless. The closest thing to a standard is the whitepaper published by the Cloud Native Computing Foundation titled CNCF WG-Serverless Whitepaper v1.0 (PDF). The paper describes serverless computing as “building and running applications that do not require server management.” The paper continues to state they are “executed, scaled, and billed in response to the exact demand needed at the moment.”

It’s easy to label almost everything serverless, but there is a difference between managed and serverless. A managed service takes care of responsibilities for you, such as standing up a website or hosting a Docker container. Serverless is a managed service but requires a bit more. Here is Jeremy’s Serverless Rules.

  1. The service should be capable of running entirely in the cloud. Running locally is fine and often preferred for developing, testing, and debugging, but ultimately it should end up in the cloud.
  2. You don’t have to configure a virtual machine or cluster. Docker is great, but containers require a Docker host to run. That host typically means setting up a VM and, for resiliency and scale, using an orchestrator like Kubernetes to scale the solution. There are also services like Azure Web Apps that provide a fully managed experience for running web apps and containers, but I don’t consider them serverless because they break the next rule.
  3. You only pay for active invocations and never for idle time. This rule is important, and the essence of micro-billing. ACI is a great way to run a container, but I pay for it even when it’s not being used. A function, on the other hand, only bills when it’s called.

These rules are why I stopped calling managed databases “serverless.” So, what, then, does qualify as serverless?

The Azure serverless platform includes Azure Functions, Logic Apps, and Event Grid. In this post, we’ll take a closer look at Azure Functions.

Azure Functions

Azure Functions allows you to write code that is executed based on an event, or trigger. Triggers may include an HTTP request, a timer, a message in a queue, or any other number of important events. The code is passed details of the trigger but can also access bindings that make it easier to connect to resources like databases and storage. The serverless Azure Functions model is based on two parameters: invocations and gigabyte seconds.

Invocations are the number of times the function is invoked based on its trigger. Gigabyte seconds is a function of memory usage. Image a graph that shows time on the x-axis and memory consumption on the y-axis. Plot the memory usage of your function over time. Gigabyte seconds represent the area under the curve.

Let’s assume you have a microservice that is called every minute and takes one second to scan and aggregate data. It uses a steady 128 megabytes of memory during the run. Using the Azure Pricing Calculator, you’ll find that the cost is free. That’s because the first 400,000 Gigabyte seconds and 1 million invocations are free every month. Running every second (there are 2,628,000 seconds in a month) with double memory (256 megabytes), the entire monthly cost is estimated at $4.51.

Azure Functions pricing

Pricing calculator for Azure Functions

Recently I tweeted about my own experience with serverless cost (or lack thereof). I wrote a link-shortening tool. It uses a function to take long URLs and turn them into a shorter code I can easily share. I also have a function that takes the short code and performs the redirect, then stores the data in a queue. Another microservice processes items in the queue and stores metadata that I can analyze for later. I have tens of thousands of invocations per month and my total cost is less than a dollar.

Link shortener stats

A tweet about cost of running serverless code in Azure

Do I have your attention?

In future posts I will explore the cost model for Logic Apps and Event Grid. In the meantime…

Learn about and get started with your first Azure Function by following this link: https://aka.ms/go-funcs

Posted on Leave a comment

PHP 5.6.36 is available

 Hello! The PHP development team announces the immediate availability of PHP 5.6.36. This is a security release. Several security bugs have been fixed in this release. All PHP 5.6 users are encouraged to upgrade to this version. For source downloads of PHP 5.6.36 please visit our downloads page: http://www.php.net/downloads.php Windows binaries can be found on http://windows.php.net/download/. The list of changes is recorded in the ChangeLog: http://www.php.net/ChangeLog-5.php#5.6.36 To verify the downloads, you can use the following information: php-5.6.36.tar.bz2 SHA256 hash: 626a0e3f5d8a0e686a2b930f0dd3a0601fe3dcb5e43dd0e8c3fab631e64e172a PGP signature: -----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJa37ZtAAoJEMK/C8Qzz8iz8XQIAIhmNbsUrGxGKoyP37zzVxby 7zTYsRfZt2sOw+tLaBj15co95ncc86UATph6stDWyVaVp+CNlLF1Sh0TpDJOuiBO HrUWmMrOM7R4gaI2P22HD7d+zvZJLzgwtkaQ6+jrt2qhr5wPqBky3B321FMREnYA FLq13pb2hHSCLfeuYKZe2+KBouOmDFCi0+VKy8PdhHYAbMbbMFHGaVMEWwbr8Ulv oqozMa4STTmMpzdOc/6rMSFcQ01dndTQGuq3AelHtwkb7rus0I11S4CrwsEsV24F 6RIOJ7ORcNDIxCe/xF+mPOE2rvJTNbQxinrGEFduNN8NPP/6RsZ6ZfCIiA6hrxs= =rtkh -----END PGP SIGNATURE----- php-5.6.36.tar.gz SHA256 hash: 06086a8b6a9964ef8009c4d9176b4eeb0c564ea39c1213f015e24f3466d2d69f PGP signature: -----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJa37ZyAAoJEMK/C8Qzz8izIYYH/18ltAzkrqLP+5m0MPZKJNH8 oISnKo4dB6i6PdSl65Pw6EqfgA8sEU6NGztSi82bysPMm9pvZn7hv1zhOISaqsUP GeUCcq+5poN/saymlmsjtF7cB/RyhiMKBDJ9yQkIuLR8dxcaY4YkwKx6lNKjYme5 k7TlnQc4YVFuukDZhLWYfvEJDyrKtYNCnXDpfcxIFiV9oqYWzSvR8oOoxkDJE5Qu q/eSoXUFeiXJLp4DL/38ph+z5+YhtjqDMJN2sJ18PVFWHRHtOuvMsPm3dy4l49di oyBoA5PxLA7rAjy0evaig6CrJPOOFKv2Zjc+5vB9bXFjKG8OR1Tbk6N3BFaNrHk= =6vkh -----END PGP SIGNATURE----- php-5.6.36.tar.xz SHA256 hash: 18f536bf548e909b4e980379d0c4e56d024b2b1eb1c9768fd169360491f1d6dd PGP signature: -----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJa37Z3AAoJEMK/C8Qzz8izUa8IAJyMUOUk2jpYEg9+xarMFLYE tzt703TMjq3cIIyt9ds1hNU64MBC/y+Pzg5RTQAkG2XD88pwN5B3NwUp2KAgbXsQ TKtw+ymMJ/JFk6X4qh0Xx8R4MT8CTU3ZoUMY5WBVa3CbFy9PFMhMrJK6KnM+ATcJ 6cV2jE0Ca5c5ENWgkfNmPlSMjCni/dzPRrfBySbJpRuDbNkfY3AGngr2E1k/WKR7 VwgVIcdGgnJMf3x2NIxokr2gQcShhY7SE5hqflsG7099yIel51pSOxoGuSWOfq4j mBx0bLB39uyUm69HasZR518fgpZJOyE3R9iDsF1itaWbfG66/1h02HNJKjD9FHU= =cf+7 -----END PGP SIGNATURE----- Julien Pauli & Ferenc Kovacs
Posted on Leave a comment

PHP 7.2.5 Released

Hi, The PHP development team announces the immediate availability of PHP 7.2.5. This is a security release which also contains several minor bug fixes. All PHP 7.2 users are encouraged to upgrade to this version. For source downloads of PHP 7.2.5 please visit our downloads page. Windows binaries can be found on the PHP for Windows site. The list of changes is recorded in the ChangeLog. Release Announcement: http://php.net/releases/7_2_5.php Downloads: http://www.php.net/downloads Windows downloads: http://windows.php.net/download Changelog: http://www.php.net/ChangeLog-7.php#7.2.5 Many thanks to all the contributors and supporters! Sara Golemon, Remi Collet php-7.2.5.tar.gz SHA256 hash: c198aedd4cd16db0803e0ef955036722a1f4ce9ad3827546709fac05f1567ba5 PGP signature: -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJa30kSAAoJENyf+NPuWvJ/qqkP/icRqp7mRXn3Gm2uq+oacW6z mRm0NTPPxXV6eGPiQs5NPDfCdqSQ61oIA5iw+3FjET0Cf/8c/gAB7KWC04dl4BPR mv9yms8YtMd8FZPhrzO0lqwnCrPuULAjvSiOllziNVnm+hX52mKcWxGN3O4Ic44b 2yTwQ4/p7kMDCMwAWS3584GPOkk04zTOahFUGQf7LIT0+zYMlEXnJcsclEge5C7N htIokbs3x8jFs94mvWgNLIl9povxLD1VpNnKNEx4VduEHpkXQLlMkkqaeK+ysAep fJ+APqUiv+chbisG+b3GF+zBuCi9Uzecd7cg/UwbyE11e0gqaYC5/QrxYyy8YW3a JI8gSGBC7iwfuBguGWLIWEA8a74JZ/GDAGOgjD6+DG5EqQmzgZudmcZnF9nF1qMD PORmwNsQJq4tom5ORQmRbu8XRPfg67sLe6aUYlw59/MCuESUpHD9EOD4a0dRolTo 3kJzK6+1rwKtmMhIM63Jqk6uSwXjt/WM9ypRSgDX2/5BFxzYRAexkyrPzkdMsGVF 0q9DBTWi7a7kYMAWBDVQ4p0Cn4U5L/4/zB2fuS/8lUfA8xntcodLFSphzCNxjjwW Ut6o6uk8PagniWC5jD+RqG8Wggbnf6oLRyv8sw+P7C3h+w54LeRtl6lPmLLVorvJ HiuUmonSgu+ZwukjNxhz =woFY -----END PGP SIGNATURE----- php-7.2.5.tar.bz2 SHA256 hash: f3820efa8efa79628b6e1b5b2f8c1b04c08d32e6721fa1654039ce5f89796031 PGP signature: -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJa30kWAAoJENyf+NPuWvJ/YgUP/j1cTSFC2MBFZCwWq9r8bmBf 6Nhv1n2NZsczWODwK1DCDJK9xoXOhFYcDP8uWDiJalRMbVQHiMqyS5FF9x7cU8Xo C5uXIAjdL0wzQDhEokB+oMq+x61OJQYWfr49spXwDbu/iyGWNn90wRbd25/+mfuT GnfeLmO+pzyzNPm+vr2iHxbpOdafzRKdYgw9BML/eMF+dwCb6mnbgBhwbn2ZWGaZ E5AGTvYJTajbbmdWu4h+30KDxmQjqWNA8kk/Qw6+0ppNhtzvjLDH5pR/KePn/6/X oshu5zzSyf9Zn4WemgR61ocVmY8UYHphEajuNCJQyE2nYiDaOj+K+cpxasj7J2up iSlOMS6eWy6LrJyxVVzYqm3DghVtvLiuLsn6khGtnCwaT/4TzytQpteLK4hqGKZi vyqTZZPbZigpQLrpCKhuSU1u+UcUpmxUJvqLPENziW/Rsrci9c9iwZx39zrOmXQO BKWiK5K5W0ojl7wAVo8Oxh56Gj7BxzTMehC0AfjZtdCTyo+AfrgTJ4HJK43n1rPw kLIIC8Y87337G2znP0yjGgTuMJa4mjSeFdAFdA6MEVOM4JkEwIaYZfsnsYnkqKDn uG8kc4CR3Y1X3TRQ6EDE8ifogtMv/V7cn09vavqZddn3g/GByD+n1ZS2DvWj8xVq hQVAif1hK45zLNg6ZJeT =v15G -----END PGP SIGNATURE----- php-7.2.5.tar.xz SHA256 hash: af70a33b3f7a51510467199b39af151333fbbe4cc21923bad9c7cf64268cddb2 PGP signature: -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJa30kZAAoJENyf+NPuWvJ/4qkP/RjEFunVEN+qKXXFqUTBD4Fs fHPQMCYlB1ipYLUC3MJy3pXYz6eUeOtjkk/X4Ty+sObxUS6w6w5cDoL72bqsVRdn 6l0EYCMWoKBCJPlQCv3cKi9NwmHX2+TRE1HpR247GtIw5nt/7gnbtpx4ANXVeMEZ U1KrPe3HPDbGVB/O0vp+9yVcY+z5+ymyrhVg+L5A5cITaQjwd/jepJl270G5oPN6 3mCgVwRp6xyJQCNeeboJszLMjRbMfPTb7mdCf09tyv32lUiCltTXwkO/xr0F7I8i Pz5GH6mBZHvG4VYjLK+tvx3zOJvTO0GzpED1I6vMqA7SMxA7XMhWyxbQfZfMx4XZ JvR9KtnRVMMTq3hXmKbFiRGphnIlZL1INs5ADTltIxPyVSDYo2baLGHW9RzNYkcR 2eG0ZWE9qQ5PkGGrsxDl++1bT/9nbYvJ08mfqjYW8OS1+5GAV3fl3B7FTCqcj0fp q2TC0mgxK9ZQtf2+PijJvL8KmE+g3ptkH0NgsiUt5tsf0rdIJUIVm1BX+W9NSoQR z/kAcBWC0wTs/j/es3SLV5Tok02qfQ3eHvtvEEMrTxHpXdE6xCqv6M5rpt0N7GWO zTNeUoptnQmAWDfx/ll8xcxWSfjWedRiSJXD9Iw45L95mVjpWHH4tVNvHlWwNNJz S6U7zEsQW6kvnnOCtLTR =li6E -----END PGP SIGNATURE-----