microservices without the servers - meetupfiles.meetup.com/1744630/seattle meetup - microservices...
TRANSCRIPT
Microservices without the Servers
Vyom Nagrani Sr. Product Manager
AWS Lambda [email protected]
Ajay Nair Sr. Product Manager
AWS Lambda [email protected]
• Evolution of Cloud Compute towards Serverless
• About Microservices
• What is AWS Lambda
• Microservices for data processing workloads
• Other Microservice architecture patterns
Agenda
Evolution of Cloud Compute towards
Serverless
Evolution of Compute – Servers
Evolution of Compute – Racks
Evolution of Compute – Virtualization
Evolution of Compute – Colocation
Evolution of Compute – Public Cloud
Evolution of Compute – Containers
Evolution of Compute – Serverless
Evolution of Compute
No server is easier to manage than “no server”
@Werner
AWS Summit, New York, 7/9/2015
What are microservices
What are microservices
In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies. -- James Lewis and Martin Fowler
http://martinfowler.com/microservices
What are microservices
Microservices
Componentization via Smaller Services
Decentralized Governance
Organized around Business Capabilities
Smart endpoints and dumb pipes
Infrastructure Automation
Decentralized Data Management
What are microservices
https://www.nginx.com/blog/building-microservices-using-an-api-gateway/
What is AWS Lambda
AWS Lambda
Serverless, event driven compute service
Lambda = microservice without servers
AWS Lambda – Benefits
EVENT DRIVEN SCALE SERVERLESS SUBSECOND BILLING
AWS Lambda – Capabilities
BRING YOUR OWN CODE SIMPLE RESOURCE MODEL
FLEXIBLE INVOCATION PATHS GRANULAR PERMISSIONS CONTROL
AWS Lambda – How it works
MONITORING
Requests Errors
Latency Throttles
LOGGING
All metrics System/Report logs
User logs
AUTHORING
NodeJS / Java Libraries
Threads, /tmp, sockets
DEPLOYMENT
Console WYSIWYG Upload ZIP S3 bucket
Microservices for data processing workloads
SOURCE of data
Fleet of servers poll for changes
Listening to source Pushes to queue Pull off queue
Fleet of servers act as workers to process the data
Auto-scale worker nodes to adjust with
load
S3 objects Kinesis records
DDB Tables SNS messages
IoT Devices …
Cross AZ replication for
high availability
Load Balancer to distribute
traffic
Data processing architecture with servers
SOURCE of data
Attach a Lambda function
And that’s it!
Lambda does
Listening/Polling Queuing
Autoscaling Load balancing
Data processing architecture without servers
Data processing with Lambda Real-time File Processing PDF watermarking Image thumbnailing Video transcoding Document metadata Indexing Log aggregation and filtering RSS feed processing
Database
Streams
Blob
Blob
Database
Streams
Data loading/DB triggers Data validation Threshold alerting Dynamic backups Analytics ETL
Realtime Stream processing Client activity tracking Metrics generation Data cleansing Log filtering Indexing and searching Log routing IoT backends
Real time file processing demo
Other Microservice patterns with Lambda
Blob Database Other APIs
API Backends CRUD backends Data validation Trigger workflows lookups (e.g. whatsMyIP)
IoT Backends Device logic Data synching Alexa Skills
API Backends CRUD backends Data validation Trigger workflows lookups (e.g. whatsMyIP)
Blob
Database
Streams
SNS
CloudFormation
Simple Workflow
Pub-sub handlers CloudWatch alarms (SNS) Event bridges Smart notifications
AWS Service extensions Simple Workflow CloudFormation
CRUD Backend demo
What’s next for you?
1. Go to the AWS console to create and test your first Lambda function. The first 1M requests each month are on us!
2. Enjoy your serverless, event driven microservice 3. Create new ways to process data, build backends and
manage service workers
THANK YOU
Q&A
Visit http://aws.amazon.com/lambda, the AWS Compute blog, and the Lambda forum to learn more and get started using Lambda.
Case study: VidRoll
The Challenge • EC2 used for (a) powering the business
logic (b) dynamic configuration needed to bid on video ads in real time across multiple exchanges (c) real-time transcoding of video ads and running MySQL databases
• Difficulty in managing a cluster of EC2 (provision, manage, and scale the EC2 instances)
• Overhead of operations elements – instance type selection, scaling, deployment logic, and software configurations
• In order to scale the business quickly, developers needed to focus on specialized tasks and not worry about IT infrastructure.
The Benefits • Developers eliminate the need to
understand or worry about infrastructure
• Code does not need to be rewritten later as the system changes (productivity gains)
• What VidRoll can now do with 2-3 engineers would usually take 8-10 engineers because code reusability becomes a growing performance advantage.
• VidRoll has grown revenue by 10x without hiring additional technical resources to manage volume, passing the cost savings to customers.
The Solution
VidRoll case study
VidRoll case study