Wrap Your Head Around “Headless” Server Architecture
By David Stielstra | Originally posted at www.c2experience.com
Traditional application architecture anticipates sustained and peak usage to perform over a period of time. This often requires operations teams to over-provision resources to meet anticipated demand, creating “waste” outside of these high-usage periods.
In so many words, there are times where you’re paying for what you don’t use.
Consider a “headless” or serverless approach through Amazon Web Services (AWS) for your next web application. AWS has a number of services that allow you to create an on-demand, serverless architecture. One of these services is called Lambda.
Lambda is an event-driven, serverless computing platform that allows web applications to scale automatically. Lambda runs code in response to events — running only as long as it is needed and paying only for the compute time consumed. This on-demand service provides a faster, more responsive, richer user experience and reduces cost of ownership by eliminating the need to manage, monitor, and provision a fixed number of servers.
DISCLAIMER: Serverless doesn’t necessarily mean servers are not involved. This only implies that developers and IT architects don’t need to worry about managing physical capacity or limits and the administrative time for scaling. Run through the cloud and utilizing a content delivery network (CDN), a serverless approach also axes the need for manual configuration across multiple data centers, making it an ideal approach for many custom applications or back-end services.
Need an example? Let’s use the recently launched KentuckianaWorks Career Calculator as an example:
- First, a request is made for the specific URL, which presents the front-end code (HTML/CSS/JavaScript) from the AWS Simple Storage Service (S3) in the form of a static website.
- Then, a user searches by career, field of study, or income.
- When the user submits their search, the application makes a custom JavaScript API call, which triggers Lambda.
- Lambda runs code to access labor and career data stored within DynamoDB to present back to the end user. Again, this code only runs when triggered.
- Let’s say new data is added in the form of a spreadsheet upload or data feed. When the files are added to the S3 bucket, this action triggers another Lambda process which processes and updates the data automatically in DynamoDB.
That’s it. Simple, flexible, powerful, cost-efficient, and on-demand applications that respond in real time to events and new information.
David Stielstra is Managed Services Lead for The C2 Group.