Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
© 2020, Amazon Web Services, Inc. or its Affiliates. © 2020, Amazon Web Services, Inc. or its Affiliates.
David Yanacek, Sr. Principal Engineer, AWS Lambda
@dyanacek
Eliminating Busywork at the
Organizational LevelTips for using serverless to its fullest potential
© 2020, Amazon Web Services, Inc. or its Affiliates.
Table of contents
• Removing roadblocks to serverless
• Finding the right path(s) to serverless
• Leveraging trailblazers: A how-to guide
© 2020, Amazon Web Services, Inc. or its Affiliates. © 2020, Amazon Web Services, Inc. or its Affiliates.
Removing Roadblocks to Serverless
© 2020, Amazon Web Services, Inc. or its Affiliates.
LE
VE
L O
F A
BS
TR
AC
TIO
N
FOCUS ON BUSINESS LOGIC
PHYSICAL MACHINES
Requires “guess” planning
Lives for years on-premises
Heavy investments (capex)
Low innovation factor
Deploy in months
Computing evolution – A paradigm shift
© 2020, Amazon Web Services, Inc. or its Affiliates.
LE
VE
L O
F A
BS
TR
AC
TIO
N
FOCUS ON BUSINESS LOGIC
VIRTUAL MACHINES
Hardware independence
Faster provisioning speed (minutes/hours)
Trade capex for opex
More scale
Elastic resources
Faster speed and agility
Reduced maintenance
Computing evolution – A paradigm shift
© 2020, Amazon Web Services, Inc. or its Affiliates.
LE
VE
L O
F A
BS
TR
AC
TIO
N
FOCUS ON BUSINESS LOGIC
CONTAINERIZATION
Platform independence
Consistent runtime environment
Higher resource utilization
Easier and faster deployments
Isolation and sandboxing
Start speed (deploy in seconds)
Computing evolution – A paradigm shift
© 2020, Amazon Web Services, Inc. or its Affiliates.
AWS Lambda
AWS Fargate
LE
VE
L O
F A
BS
TR
AC
TIO
N
FOCUS ON BUSINESS LOGIC
Continuous scaling
Fault tolerance built-in
Pay for value
Zero maintenance
SERVERLESS
Computing evolution – A paradigm shift
© 2020, Amazon Web Services, Inc. or its Affiliates.
Laziness
© 2020, Amazon Web Services, Inc. or its Affiliates.
Laziness
Productivity
Developer efficiency
© 2020, Amazon Web Services, Inc. or its Affiliates.
Law of Laziness:
Developers choose tools that get the
job done using the least amount of effort
(Productivity)
© 2020, Amazon Web Services, Inc. or its Affiliates.
LE
VE
L O
F A
BS
TR
AC
TIO
N
SERVERLESS
AWS Lambda AWS Fargate
The path(s) to serverless
CONTAINERS
VIRTUAL MACHINES
PHYSICAL MACHINES
FOCUS ON BUSINESS LOGIC
© 2020, Amazon Web Services, Inc. or its Affiliates.
𝑠
© 2020, Amazon Web Services, Inc. or its Affiliates.
© 2020, Amazon Web Services, Inc. or its Affiliates.
© 2020, Amazon Web Services, Inc. or its Affiliates.
The invisible hand
© 2020, Amazon Web Services, Inc. or its Affiliates.
© 2020, Amazon Web Services, Inc. or its Affiliates.
LE
VE
L O
F A
BS
TR
AC
TIO
N
SERVERLESS
AWS Lambda AWS Fargate
Which path to serverless?
CONTAINERS
VIRTUAL MACHINES
PHYSICAL MACHINES
FOCUS ON BUSINESS LOGIC
© 2020, Amazon Web Services, Inc. or its Affiliates.
(Productivity)
Law of Laziness:
Developers choose tools that get the
job done using the least amount of effort
© 2020, Amazon Web Services, Inc. or its Affiliates.
© 2020, Amazon Web Services, Inc. or its Affiliates.
(less effort with serverless)
© 2020, Amazon Web Services, Inc. or its Affiliates.
Removing Barriers to Change
© 2020, Amazon Web Services, Inc. or its Affiliates.
Development transformation at Amazon: 2001-2002
© 2020, Amazon Web Services, Inc. or its Affiliates.
2-tier architecture
© 2020, Amazon Web Services, Inc. or its Affiliates.
The cost of coordination
© 2020, Amazon Web Services, Inc. or its Affiliates.
Release train: build, test, deploy, monitor
© 2020, Amazon Web Services, Inc. or its Affiliates.
Lots of coordination
developers
delivery pipeline
monolith
© 2020, Amazon Web Services, Inc. or its Affiliates.
Lots that can go wrong
developers
delivery pipeline
monolith
© 2020, Amazon Web Services, Inc. or its Affiliates.
Bottlenecked processes
© 2020, Amazon Web Services, Inc. or its Affiliates.
“[A system’s speed and throughput is
limited by the speed of its serialized tasks]”
Amdahl’s law:
© 2020, Amazon Web Services, Inc. or its Affiliates.
parallelization
serialization
Amdahl’s law:
© 2020, Amazon Web Services, Inc. or its Affiliates.
The cost of coordination
© 2020, Amazon Web Services, Inc. or its Affiliates.
parallelization
serialization
coordination
Universal scalability law:
© 2020, Amazon Web Services, Inc. or its Affiliates.
The teams behind the monolith
© 2020, Amazon Web Services, Inc. or its Affiliates.
The cost of consensus building
© 2020, Amazon Web Services, Inc. or its Affiliates.
Reduced consensus building through abstraction
API
API
API
API
© 2020, Amazon Web Services, Inc. or its Affiliates.
Reduced coordination
© 2020, Amazon Web Services, Inc. or its Affiliates.
The hidden cost of coordination
(coupling makes change harder)
© 2020, Amazon Web Services, Inc. or its Affiliates.
Breaking down activation energy
© 2020, Amazon Web Services, Inc. or its Affiliates.
Breaking down the blockers
Coordination / coupling
Existing release tools
Existing monitoring tools
Existing security practices
© 2020, Amazon Web Services, Inc. or its Affiliates.
© 2020, Amazon Web Services, Inc. or its Affiliates. © 2020, Amazon Web Services, Inc. or its Affiliates.
Where can I look for good
opportunities to use
serverless?
© 2020, Amazon Web Services, Inc. or its Affiliates.
SERVERLESS
AWS Lambda AWS Fargate
“The road less traveled”
SERVERFULL
© 2020, Amazon Web Services, Inc. or its Affiliates.
SERVERLESS
AWS Lambda AWS Fargate
All roads lead to serverless!
© 2020, Amazon Web Services, Inc. or its Affiliates.
What new development effort are
we about to take on?
© 2020, Amazon Web Services, Inc. or its Affiliates.
InstanceLambda function
Using Lambda within Lambda
?
AWS Lambda
© 2020, Amazon Web Services, Inc. or its Affiliates.
Lambda triggers
Amazon Kinesis
Amazon Simple Queue Service
Amazon DynamoDB
AWS Lambda Your Lambda Function
© 2020, Amazon Web Services, Inc. or its Affiliates.
Configuring Lambda triggers
CreateEventSourceMapping()
Amazon Kinesis
AWS Lambda Your Lambda FunctionAmazon Simple Queue Service
Amazon DynamoDB
© 2020, Amazon Web Services, Inc. or its Affiliates.
A fork in the road
Is the decision reversable?
How much coupling is there to
existing systems?
CreateEventSourceMapping()
AWS Lambda
InstanceLambda function
?
© 2020, Amazon Web Services, Inc. or its Affiliates.
All roads lead to serverless!
CreateEventSourceMapping()
AWS Lambda
Lambda function
© 2020, Amazon Web Services, Inc. or its Affiliates.
What part of the monolith is
causing scale problems?
© 2020, Amazon Web Services, Inc. or its Affiliates.
Serverless is more than compute
COMPUTE
DATA STORES
INTEGRATION
Amazon
DynamoDB
Amazon Aurora
Serverless
Amazon
S3
AWS
Lambda
AWS
Fargate
Amazon
EventBridge
Amazon
API Gateway
Amazon
SQS
Amazon
SNS
AWS
AppSync
AWS
Step Functions
© 2020, Amazon Web Services, Inc. or its Affiliates.
Example: website session data
Users
Relational Database
Web Server
(browser session data) (application data)
© 2020, Amazon Web Services, Inc. or its Affiliates.
Example: website session data
Users
Relational Database
Web Server
(browser session data) (application data)
© 2020, Amazon Web Services, Inc. or its Affiliates.
Example: Website session data
Sharded databasesAmazon DynamoDB
(session data)
(application data)
?
Users
Web Server Existing database
© 2020, Amazon Web Services, Inc. or its Affiliates.
Example: Website session data
Amazon DynamoDB
(session data)
(application data)
Users
Web Server Existing database
© 2020, Amazon Web Services, Inc. or its Affiliates.
Example: Website session data
Web Server
Amazon DynamoDB
Amazon API Gateway
Amazon DynamoDB
Accelerator (DAX) Amazon Aurora Amazon Managed
Apache Cassandra
Service
Amazon
ElastiCache
© 2020, Amazon Web Services, Inc. or its Affiliates.
What part of the monolith is
causing (human) scale problems?
© 2020, Amazon Web Services, Inc. or its Affiliates.
A different kind of scaling bottleneck
© 2020, Amazon Web Services, Inc. or its Affiliates.
Yesterday’s microservice, tomorrow’s monolith
CreateEventSourceMapping()
AWS Lambda
Control plane serviceLambda function
?
43 APIs (and counting!)
© 2020, Amazon Web Services, Inc. or its Affiliates.
Mono to Micro
Moving monolithic applications to
microservices by gradually
creating events and APIs for
various components on of the
legacy application
The Strangler Pattern
© 2020, Amazon Web Services, Inc. or its Affiliates.
Tools for branching out
Amazon API Gateway
Monolith
Foo()
Bar()
Baz()
Bar()
Baz()
Foo()Bar()
Foo()
© 2020, Amazon Web Services, Inc. or its Affiliates.
What operational paper cuts could
we automate if automation was
easy?
© 2020, Amazon Web Services, Inc. or its Affiliates.
Automating with an “ops bot”
Nightly scaling
Root cause analysis
Automated actions
Automated backups
© 2020, Amazon Web Services, Inc. or its Affiliates.
Who operates the operations automation?
© 2020, Amazon Web Services, Inc. or its Affiliates.
What new project do we need to
build especially quickly?
© 2020, Amazon Web Services, Inc. or its Affiliates.
Infrequently used web tools?
© 2020, Amazon Web Services, Inc. or its Affiliates.
Virtual Choir video uploader
Amazon Simple
Storage Service
Amazon Cognito Amazon Simple
Notification Service
notification
Choir Choir
director
© 2020, Amazon Web Services, Inc. or its Affiliates.
What might someone build during a
hackathon using serverless?
© 2020, Amazon Web Services, Inc. or its Affiliates.
Serverless is huge in hackathons
Experiment with
big ideas
Science!
Build new tools
Drive data analytics
Sandboxed prototyping
© 2020, Amazon Web Services, Inc. or its Affiliates.
Which systems utilize hardware
especially poorly?
© 2020, Amazon Web Services, Inc. or its Affiliates.
Low utilization workloads
(waste)
(problem)
(no provisioning)
© 2020, Amazon Web Services, Inc. or its Affiliates. © 2020, Amazon Web Services, Inc. or its Affiliates.
Leveraging Serverless
Trailblazers
© 2020, Amazon Web Services, Inc. or its Affiliates.
Opportunistic adoption
(low adoption cost)
(large payoff)
© 2020, Amazon Web Services, Inc. or its Affiliates.
Using a catalyst
(catalyst reduces energy)
© 2020, Amazon Web Services, Inc. or its Affiliates.
What did you do to adopt serverless
that you could avoid doing next time?
© 2020, Amazon Web Services, Inc. or its Affiliates.
Story: Bridging sign-in systems
Operators
Existing operational
tools
© 2020, Amazon Web Services, Inc. or its Affiliates.
Story: Bridging sign-in systems
Operators
Existing operational
tools
Corporate Sign-In
(verify)
© 2020, Amazon Web Services, Inc. or its Affiliates.
Story: Bridging sign-in systems
Operators
New Lambda-based
web tool
Amazon API GatewayCorporate Sign-In
?
© 2020, Amazon Web Services, Inc. or its Affiliates.
Story: Bridging sign-in systems
Operators
New Lambda-based
web tool
Corporate Sign-In Authorizer
© 2020, Amazon Web Services, Inc. or its Affiliates.
Story: Bridging sign-in systems
Operators
New Lambda-based
web tool
Corporate Sign-In Amazon Cognito Amazon
API Gateway
© 2020, Amazon Web Services, Inc. or its Affiliates.
Story: Bridging sign-in systems
New tool!
(other developers)
© 2020, Amazon Web Services, Inc. or its Affiliates. © 2020, Amazon Web Services, Inc. or its Affiliates.
In conclusion…
© 2020, Amazon Web Services, Inc. or its Affiliates.
(Productivity)
Law of Laziness:
Developers choose tools that get the
job done using the least amount of effort
© 2020, Amazon Web Services, Inc. or its Affiliates.
LE
VE
L O
F A
BS
TR
AC
TIO
N
SERVERLESS
AWS Lambda AWS Fargate
More abstraction, less busywork
CONTAINERS
VIRTUAL MACHINES
PHYSICAL MACHINES
FOCUS ON BUSINESS LOGIC
© 2020, Amazon Web Services, Inc. or its Affiliates.
LE
VE
L O
F A
BS
TR
AC
TIO
N
SERVERLESS
AWS Lambda AWS Fargate
Many starting points, many paths
CONTAINERS
VIRTUAL MACHINES
PHYSICAL MACHINES
FOCUS ON BUSINESS LOGIC
© 2020, Amazon Web Services, Inc. or its Affiliates.
Identifying opportunities and catalysts
(low adoption cost)
(large payoff)(catalysts)
© 2020, Amazon Web Services, Inc. or its Affiliates.
Many paths, many questions
• New development?
• System scale problems?
• Human scale problems?
• Missing operational tools?
• Urgent new project?
• Poor utilization?
• Hackathon ideas?
• Adoption papercuts?
© 2020, Amazon Web Services, Inc. or its Affiliates.
SERVERLESS
AWS Lambda AWS Fargate
All roads lead to serverless!
© 2020, Amazon Web Services, Inc. or its Affiliates.
SOA: Service-oriented architecture
API
API
API
API
© 2020, Amazon Web Services, Inc. or its Affiliates.
Conway’s law:
The structure of any system designed by an organization
is isomorphic to the structure of the organization.
© 2020, Amazon Web Services, Inc. or its Affiliates.
SOA:
Service-oriented architecture
© 2020, Amazon Web Services, Inc. or its Affiliates.
The new SOA:
Serverless organizational architecture
© 2020, Amazon Web Services, Inc. or its Affiliates.
Thank you!@dyanacek