For a lot of people serverless = lambda! That's a good start, compute is where everything started for the cloud. But serverless goes beyond just using a bunch of Lambdas in the backend. I & my friend Adithya used to get frustrated at answering repetitive questions from other friends challenging serverless. So we thought, instead of talking about low hanging fruits which can be done in serverless, let's challenge ourselves into trying to implement what 'we think' would be hard to do on serverless.
What’s a Circuit Breaker?
Circuit breaker is a design pattern used in modern
software development. It is used to detect failures
and encapsulates the logic of preventing a failure
from constantly recurring, during maintenance,
temporary external system failure or unexpected
• Allow systems to "open" the circuit when constant failures
happen repeatedly giving immediate failure responses
instead of loading the system. It can later try "half open"
and see if the system is functioning fine now and "close" in
case things are back to normal, making it self-healing.
• Allow us to contain failures and stop them from creating a
cascading effect of other parts.
Circuit Breaker Using Lambda
Circuit Breaker Using Step Functions
• Secure hierarchical storage for configuration and secrets
• Store as plain text / KMS encrypted strings
• Reference by unique name
• Version history, access control at key / hierarchy level
• Configurable on-change triggers via CloudWatch Events
• CloudWatch + CloudTrail
• Reference-able asTerraform data source (and CloudFormation – but only
specific versions of keys)
• Generous free limits (1000TPS free, $0.05 per 10,000TPS)
Example Architecture – Resize image to multiple
• SQS can be integrated with almost any kind of service
allowing wide set of triggers
• Auto-scale without hassle
• No infrastructure to manage
• Per second billing (min 1 minute) for the resources used,
vCPU & memory
• Easy to handle failures and retries