Speed layer

The speed layer is also relatively simple. Each message published to the Kinesis stream will trigger a Lambda function. This Lambda function will just write the data to DynamoDB so that we can serve data in real time for any queries. With this design, we're set up for a decent amount of real-time load and concurrency. The data producer will deliver data at a reasonably fast rate, perhaps a few messages per second. If there was a burst of traffic and the speed layer started seeing tens or hundreds of messages per second, it would not be a problem.

Since serverless functions and databases such as DynamoDB scale linearly, the speed layer can absorb practically any amount of real-time traffic. There are, of course, provisioning and ...

Get Serverless Design Patterns and Best Practices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.