33

At the moment we are running our application on an AWS Beanstalk but are trying to determine the suitablilty of Azure.

Our biggest issue is the amount of wasted CPU time we are paying for but not using. We are running on t2.small instances as these have the min amount of RAM we need but we never use even the base amount of CPU time allotted. (20% for a t2.small ) We need lots of CPU power during short bursts of the day and bringing more instances on line in advance of this is the only way we can handle it. AWS Lambda looks a good solution for us but we have dependencies on Windows components like SAPI so we have to run inside of Windows VMs.

Looking at Azure cloud services we thought using a Web role would be best fit for our app but it seems a Web role is nothing more than a Win 2012 VM with IIS enabled. So as the app scales it just brings on more of these VMs which is exactly what we have at the moment. Does Azure have a service similar to Lambda where you just pay for the CPU processing time you use? The reason for our inefficient use of CPU resources is that our speech generation app uses lost of 3rd party voices but can only run single threaded when calling into SAPI because the voice engine is prone to crashing when multithreading. We have no control over this voice engine. It must have access to a system registry and Windows SAPI so the ideal solution is to somehow wrap all dependencies is a package and deploy this onto Azure and then kick off multiple instances of this. What "this" is I have no Idea

mathewc
  • 13,312
  • 2
  • 45
  • 53
MayoMan
  • 4,757
  • 10
  • 53
  • 85

4 Answers4

45

Microsoft just announced a new serverless compute service as an alternative to AWS Lambda, called Azure Functions: https://azure.microsoft.com/en-us/services/functions/

http://www.zdnet.com/article/microsoft-releases-preview-of-new-azure-serverless-compute-service-to-take-on-aws-lambda/

With Azure Functions you only pay for what you use with compute metered to the nearest 100ms at Per/GB price based on the time your function runs and the memory size of the function space you choose. Function space size can range from 128mb to 1536mb. With the first 400k GB/Sec free.

Azure Function requests are charged per million requests, with the first 1 million requests free.

Erik Oppedijk
  • 3,496
  • 4
  • 31
  • 42
  • One should add that while AWS Lambda and Azure Functions are equivalent, Lambda is uses to implement services that are already available in Azure. Eg, Amazon doesn't offer any ETL dataflow tools so people use Lambda to implement the pipelines. Azure though offers both Data Factory and U-SQL. The same for Azure Stream Analytics - Kinesis Analytics is still in the "Fill this email form" phase so people use Lambdas to implement event analytics. – Panagiotis Kanavos Apr 01 '16 at 13:28
8

Based on the documentation on Azure website here: https://azure.microsoft.com/en-in/campaigns/azure-vs-aws/mapping/, the services equivalent to AWS Lambda are Web Jobs and Logic Apps.

Gaurav Mantri
  • 128,066
  • 12
  • 206
  • 241
  • 1
    I do find it very odd that they don't include Azure Automation as a direct equivalent to Lambda! – Michael B Mar 22 '16 at 15:44
  • I'm surprised as well. Azure team must have done some diligence before putting out this mapping. – Gaurav Mantri Mar 22 '16 at 15:49
  • Or, it offers proof that they didn't! Since it is clearly a very similar product (I just opened [Lambda](http://docs.aws.amazon.com/lambda/latest/dg/welcome.html) and [Automation](https://azure.microsoft.com/en-in/documentation/services/automation/) front pages up, and they're almost identical in what they say they offer) – Michael B Mar 22 '16 at 15:55
1

The most direct equivalent of Lambda on Azure is Azure Automation which does a lot of what Lambda does except it runs Powershell instead of Node etc. It isn't as tightly integrated into other services like Lambda is, but it has the same model. i.e. you write a script, and it is executed on demand.

I presume by SAPI you are refering to the speech API? If so you can create Powershell modules for Azure, and they can include dll files. In which case you could create a module to wrap around the SAPI dll, and that should do what you are looking for.

If you want a full compute environment, without the complexity of multiple machines when you run. You could use Azure Batch which would be the Azure recommended way of running what you are looking for.

The cost benefit you need to evaluate would be how much quicker your solution would run against a native .net stack (in batch), and if performance is significantly degraded when run from Powershell.

Personally I would give Automation a try, it is surprisingly powerful.

Michael B
  • 11,887
  • 6
  • 38
  • 74
-2

There is something called "Cloud Service" in azure which allows you to run code on a pure VM. Scaling options on these include such things as CPU%, queue size, etc. If you can schedule your needs, Azure allows you to easily set up a scheduled scaler, i.e. 4 VM's from 8AM until 08:10AM, and of course, in Azure, you pay by the minute, so it could be a feasible solution.

I'd say more, but the documentation in Azure is really so great that I'd be offending them by offering my "translation" here. Checkout azure.com for more info :)

Pedro G. Dias
  • 3,162
  • 1
  • 18
  • 30
  • The OP has already stated that he's not looking to run a Vm, A cloud service is simply a container for a Vm / Web app, its not a replacement in its own right. – Michael B Mar 22 '16 at 15:18
  • I know he stated that, but Azure is not AWS, there are two very important distinctions: 1) you pay by the minute, which in this case seems important, and 2) While true that a cloud service runs in a VM, you do not manage that VM at all, only the application. Anything related to uptime, failover, fault domains etc is handled by the cloud service, so it's a very viable solution to the problem. Not sure why this is downvoted when it is a clear match – Pedro G. Dias Mar 22 '16 at 15:21
  • Hey Pedro, thanks for the answer but using Azure cloud service would be almost identical to what we have at the moment with AWS, except cost would be 2x. The most basic VM that a web/worker role would use costs 2.5x what an EC2 t2.small costs. – MayoMan Mar 22 '16 at 16:35