Anthony Chu Contact Me

Serving Static Files from Azure Functions

Thursday, March 9, 2017

I've written about how to serve a single HTML page or a single Swagger file with Azure Functions before. But it hasn't really been easy or even possible to serve an entire site with Azure Functions. With the release of a new feature called Azure Functions Proxies a couple of weeks ago, we can now create a pretty capable HTTP static file server using Azure Functions.

Continue Reading...

Hosting Jekyll on Azure App Service on Linux

Tuesday, February 28, 2017

Microsoft announced Azure App Service on Linux back in September. On the surface it looks just like the App Service we know and love, except now running on Linux. But under the covers it's quite different and uses Docker extensively.

Thanks to its support of Docker, we can use almost any Linux-based Docker image in a Linux Web App. Today we'll look at how to set up App Service on Linux to build and serve a Jekyll site that is deployed continuously from GitHub.

Continue Reading...

Using ES2017 async/await in Node

Thursday, February 23, 2017

A couple of days ago, Node 7.6.0 was released. One of the changes was an update to version 5.5 of the V8 JavaScript engine. This meant that async/await support is now enabled by default! Finally, we can use the async and await keywords in Node without the need for a transpiler or turning on command line flags.

And what's better is that Azure App Service has already added support for Node 7.6.0.

Today we'll create a simple application to explore async/await in Node. Then we'll deploy it to Azure App Service.

Continue Reading...

Scaling HTTP Azure Functions

Wednesday, February 15, 2017

One of the promises of serverless computing is automatic scaling based on load. I decided to run some HTTP load tests on Azure Functions to see how well it scales. In particular, how many instances does the function app scale out to? How does load affect response times and throughput? How stable is Azure Functions as it scales out?

Before we begin, I want to point out that this is by no means a scientific test. Take the results with a giant grain of salt.

Continue Reading...

Process Azure API Management Logs with Data Lake Analytics and U-SQL

Sunday, February 12, 2017

Azure API Management comes with a rich set of built-in analytics to gain insight into the APIs' activities, such as usage by user, APIs, operations, and geography. But there are times when we want to perform custom queries over the activities. For this, API Management allows us to log API activities to Event Hubs.

Once the logs are flowing through Event Hubs, there are many ways we can use the data. For instance, we can save the logs into a Table Storage using Azure Functions and query it with Power BI; or we can process the live stream using Stream Analytics.

Today, we'll look at how to use Event Hubs Archive to automatically save the logs into Blob Storage. And we'll query the logs from Blob Storage using Data Lake Analytics.

I've already written an article with details on how to turn on Event Hubs Archive and query it using U-SQL with Data Lake Analytics. I won't repeat some of those details; instead I'll focus on how to use these tools with Azure API Management.

Continue Reading...