๐Ÿ‘‰ AWS Debug Games (Beta) - Prove your AWS expertise by solving tricky challenges.

๐Ÿ‘‰ AWS Debug Games - Prove your AWS expertise.

Eat your own dog food: how AWS leverages Serverless

Michael Wittig โ€“ 10 Dec 2018

Tim Bray from Amazon gave a great talk at re:Invent 2018 where he shows us how AWS uses Serverless technologies. Did you know that some of the newer services such as API Gateway and EKS are using API Gateway and Lambda to implement the control plane? In this post, I summarise a few interesting points he made. I also encourage you to watch the full video.

Dog Food

SQS internals

SQS provides message queues as a service. The following figure shows a high-level architecture of the SQS service.

SQS internals

When a client make calls to the SQS API, you talk to the Front End service of SQS. The Front End service asks the Metadata service (backed by DynamoDB) for internal data about the queue. Does it exist? How does the queue policy look like? Which Back End cluster is responsible for the queue? Once the Front End knows the answers, it likely checks if the requestor is allowed to make the request and routes the request to one of the many Back End clusters to process the message. A single Back End cluster is responsible for one or many queues (or partitions of a queue) and stores your messages in a distributed manner on the cluster.

In the background, the Load Manager service continually checks the utilization of the Back End clusters. If a cluster gets hot, the queues are partitioned and/or moved to other/new clusters. If clusters idle, queues are moved as well to shut down whole clusters. As users of SQS, we donโ€™t see any of this. We send and retrieve messages.

One funny anecdote Tim shares with us: the SQS team replaced an Oracle Database with DynamoDB.


Looking for a new challenge?

  • DEMICON

    Cloud Operations Lead

    DEMICON • AWS Advanced Consulting Partner • Remote (Europe)
    service-delivery-management hiring devops platform

Amazon MQ internals

Amazon MQ runs ActiveMQ brokers on your behalf. The following figure shows a high-level architecture of the ActiveMQ service.

Amazon MQ internals

The brokers itself run on EC2 Instances and likely persist your state on EBS volumes. Tim calls this the Data Plane. Interestingly, the Control Plane (e.g., the public API) is implemented using API Gateway and Lambda functions that store the state about the ActiveMQ clusters in DynamoDB.

AWS uses Serverless to implement control planes

Also, Tim talks about a few other services that come with Serverless control planes:

  • Amazon SageMaker
  • AWS Batch
  • AWS Elemental
  • AWS AppSync
  • AWS IoT Core
  • Amazon GuardDuty
  • Amazon EKS
  • Amazon API Gateway

Funny story: API Gateway itself uses a Serverless control plane.

Full video

I hope you are now interested in the full talk!

Whatโ€™s your favorite talk from re:Invent? Let me know!

Become a cloudonaut supporter

Michael Wittig

Michael Wittig ( Email Twitter LinkedIn Mastodon )

We launched the cloudonaut blog in 2015. Since then, we have published 365 articles, 68 podcast episodes, and 68 videos. It's all free and means a lot of work in our spare time. We enjoy sharing our AWS knowledge with you.

Please support us

Have you learned something new by reading, listening, or watching our content? With your help, we can spend enough time to keep publishing great content in the future. Learn more

$
Amount must be a multriply of 5. E.g, 5, 10, 15.

Thanks to Alan Leech, Alex DeBrie, Christopher Hipwell, Jason Yorty, Jeff Finley, jhoadley, Johannes Konings, John Culkin, Jonathan Deamer, Juraj Martinka, Ken Snyder, Markus Ellers, Oriol Rodriguez, Ross Mohan, sam onaga, Satyendra Sharma, Simon Devlin, Todd Valentine, Victor Grenu, and all anonymous supporters for your help! We also want to thank all supporters who purchased a cloudonaut t-shirt.