Challenges in serverless computing, can we finally focus on just business logic?
The promise of every new tech in the software industry is to make developers focus on the business logic without dealing with the underlying platform. Serverless technologies are no exception.
In this talk, I will talk about my experiences as a developer while my development stack moves towards serverless technologies. I will talk about the pain points of AWS Lambda and how changing the mindset of old enterprise web development to developing for stateless event-driven systems helped me to reduce these pain points.
When serverless architecture gets bigger and more complex, troubleshooting when something unexpected goes wrong becomes the biggest challenge. I will talk about the difference between traditional monitoring solutions and serverless monitoring solutions and show a demo of our monitoring solution Thundra.
2. WHO AM I?
▸ Graduated From Bilkent University CS in 2011 in Ankara
▸ Software Engineer @Thundra
▸ 8 years of coding experience mostly in Java Enterprise
Applications
▸ Co-Founder of Ankara Cloud Meetup
▸ AWS Certified Developer Associate
3. AGENDA
▸ Serverless Introduction
▸ AWS Lambda and popular server less architecture
▸ My Story with AWS Lambda
▸ Development Story of Thundra
▸ Thundra Demo
10. COMMON TRAITS OF SERVERLESS FRAMEWORK
▸ No management of server hosts of server processes
▸ Self auto-scale and auto provision on loads
▸ Cost are based on precise usage (0 usage = 0 cost)
▸ Performance capabilities defined in terms other than host
size/count
▸ Implicit High Availability
12. PROBLEMS
▸ Loss of Control
▸ Loss of Server Optimization
▸ DoS Yourself
▸ Vendor lock-in (Maybe not)
▸ Tooling
▸ Testing(Embrace the cloud)
▸ Latency
▸ State? What State?
▸ Managed Services are moving targets
14. STILL NEED GREAT ENGINEERS
▸ Everything is Event Driven
▸ Functions should be
idempotent
▸ Stateless with a twist
▸ Choose additional tools
wisely
15. USE CASE & NOT SO GREAT
▸ Latency tolerant, async app
▸ Latency tolerant, sync app
NOT SO GREAT
USE CASE
▸ Low Latency & sync app (<10ms)
▸ Large scale and stateful
16. SERVERLESS IS MORE SECURE
▸ No Unpatched Servers
▸ No Snowflake Servers
▸ No SSH
▸ Every request is authorized and audible
▸ Functions are short-lived
18. SERVERLESS MANIFESTO
▸ Functions are the unit of deployment and
scaling
▸ No machines, VMs or containers visible in the
programming model
▸ Permanent storage lives elsewhere
▸ Scales per request;
▸ Never pay for idle
▸ Implicitly fault-tolerant because functions can
run anywhere
▸ BYOC : Bring your own code
▸ Metrics, logging and traces are a universal right
http://alexander.holbreich.org/serverless-manifesto/
19. OBSERVABILITY
▸ Metrics
▸ Logs
▸ Traces
In control theory, observability is a measure of how well internal states of a system
can be inferred from knowledge of its external outputs. The observability and
controllability of a system are mathematical duals.
THREE PILLARS OF OBSERVABILITY
38. LEARN FROM FAILURES
▸ Wrote my first infinite recursive function, Big AWS Bill
▸ Run Lambda Inside VPC and deal with cold start
▸ See lambda might invoke twice in async invocation
▸ No concurrent execution limit. One lambda exhausted whole
system
▸ Run Lambda Inside VPC, ENI Exhaustion whole system down again
▸ Got my first out of memory error and time out error and not alerted
correctly
▸ Infinite retry with a kinesis shard, Big AWS Bill
https://cloudonaut.io/your-lambda-function-might-execute-twice-deal-with-it/
https://read.acloud.guru/does-aws-lambda-keep-its-serverless-marketing-promise-of-continuous-scaling-e990114bb379
45. WHAT IS THUNDRA?
The black box nature of AWS Lambda and other serverless environments means
that identifying and fixing performance issues is difficult and time-consuming.
Built for straightforward debugging, monitoring, and observability, Thundra
provides deep insight into your entire serverless environment. Starting from bird
eye view of your serverless architecture to the tiniest detail, Thundra collects and
correlates all your metrics, logs, and traces, allowing you to quickly identify
problematic invocations and also analyzes external services associated with that
function.
With Thundra’s zero overhead and automated instrumentation capabilities, your
developers are free to write code without worrying about bulking up their
Lambdas or wasting time on chasing black box problems.