

The extra latency caused by “cold starts” was not a big concern When a Lambda function hasn’t been used for 10mins, it goes “cold”, meaning that its system resources are automatically freed up.This means that we could afford to be more conservative with the resources allocated to each serverless function, which thus kept the price down. The data hub polls the shop for new sales orders, but this has no bearing on the customer’s ability to place orders. New data is transmitted from the shopfront to the data hub in the background. The services were background workers rather than RESTful endpoints The customer-facing components of the shop didn’t depend on the services to return any kind of response.For now, the main points to note here are that: If you’re interested in more technical details about how this data hub worked, see the companion article. We were using data hubs to orchestrate data exchange between the different constituent systems.Įach worker was in charge of exchanging data between the data hub and a satellite system. We were building a new back end that was based on several data hubs. In a companion article, I also go into more of the technical details about the project and how we had to adapt it for Lambda. If these factors sound interesting to you, then read on, because I’ll explain them in more detail. These factors all influenced our decision to use FaaS (Functions as a Service) with AWS Lambda, rather than “CaaS” (Containers-as-a-Service) with Fargate.
AWS FARGATE STARTUP TIME CODE
The effort required to refactor the code (we used PHP which is well supported).The complexity of the service architecture (very simple worker microservices ).The performance requirements of the application (not especially high).The growth phase of the company and how quickly they expected to scale (slow and steady growth).There were some very specific factors that contributed to our success. But I don’t want to waste your time with an inapplicable use case. If you work for a startup and are responsible for infrastructure costs, you might be able to make similar cost reductions. We did it by moving their services from containers (in AWS Fargate) to functions (in AWS Lambda). We helped this company to reduce their monthly AWS bill from around $2,200 (before tax) to around $773 per month. We were helping a new company in our portfolio and their AWS bill was too high for the size of their business (so technically it wasn’t our bill).
