Microservices are an architectural approach to decompose complex applications into smaller, independent services. AWS customers benefit from increased agility, simplified scalability, resiliency, and faster deployments by migrating from monoliths to microservices based architecture.
In this session, we will provide an overview of the benefits and challenges of microservices, and share best practices for architecting and deploying microservices on AWS. We will dive into different approaches you can take to run microservices applications at scale and explore how services like Amazon ECS, AWS Lambda, and AWS X-Ray make it simpler to design and maintain these applications.
Learning Objectives:
1. Understand the fundamentals of the microservices architectural approach
2. Learn best practices for designing microservices on AWS
3. Learn the basics of Amazon EC2 Container Service, AWS Lambda, and AWS X-Ray
6. Challenges with monolithic software
Long
Build/Test/Release
Cycles
(who broke the build?)
Operations
is a nightmare
(module X is failing,
who’s the owner?)
Difficult to
scale
New releases
take months
Long time to add
new features
Architecture is
hard to maintain
and evolve
Lack of innovation
Frustrated customers
Lack of agility
7. Challenges with monolithic software
Long
Build/Test/Release
Cycles
(who broke the build?)
Operations
is a nightmare
(module X is failing,
who’s the owner?)
Difficult to
scale
New releases
take months
Long time to add
new features
Architecture is
hard to maintain
and evolve
Lack of innovation
Frustrated customers
Lack of agility
8. Challenges with monolithic software
Long
Build/Test/Release
Cycles
(who broke the build?)
Operations
is a nightmare
(module X is failing,
who’s the owner?)
Difficult to
scale
New releases
take months
Long time to add
new features
Architecture is
hard to maintain
and evolve
Lack of innovation
Frustrated customers
Lack of agility
18. “Do one thing, and do it well”
“Swiss Army” by by Jim Pennucci. No alterations other than cropping. https://www.flickr.com/photos/pennuja/5363518281/
Image used with permissions under Creative Commons license 2.0, Attribution Generic License (https://creativecommons.org/licenses/by/2.0/)
28. = 50 million deployments a year
Thousands of teams
× Microservice architecture
× Continuous delivery
× Multiple environments
(5708 per hour, or every 0.63 second)
38. Elastic Beanstalk vs. DIY
Your code
HTTP server
Application server
Language interpreter
Operating system
Host
Elastic Beanstalk configures each
EC2 instance in your environment
with the components necessary to
run applications for the selected
platform. No more worrying about
logging into instances to install and
configure your application stack.
Focus on building your application
Provided by you
Provided and managed by Elastic Beanstalk
On-instance configuration
41. Cluster Management Made Easy
• Nothing to run
• Complete state
• Control and monitoring
• Scale
Use Amazon EC2 Container Service for container workloads
Amazon
EC2 Container
Service (ECS)
42. Flexible Scheduling
• Applications
• Batch jobs
• Multiple schedulers
Use Amazon EC2 Container Service for container workloads
Amazon
EC2 Container
Service (ECS)
43. Designed for Use with Other AWS Services
• Elastic Load Balancing
• Amazon Elastic Block Store
• Amazon Virtual Private Cloud
• AWS Identity and Access Management
• AWS CloudTrail
Use Amazon EC2 Container Service for container workloads
Amazon
EC2 Container
Service (ECS)
71. Principle 4: Be a good citizen within the ecosystem
(Have clear SLAs)
Restaurant
Micro-service
15 TPS100 TPS5 TPS20 TPS
Before we let you call
our micro-service we
need to understand
your use case, expected
load (TPS) and accepted
latency
77. Silo’d functional teams à silo’d application architectures
Image from Martin Fowler’s article on microservices, at
http://martinfowler.com/articles/microservices.html
No alterations other than cropping.
Permission to reproduce: http://martinfowler.com/faq.html
78. Cross functional teams à self-contained services
Image from Martin Fowler’s article on microservices, at
http://martinfowler.com/articles/microservices.html
No alterations other than cropping.
Permission to reproduce: http://martinfowler.com/faq.html
88. It’s a journey…
Expect challenges along the way…
• Understanding of business domains
• Eventual Consistency
• Service discovery
• Lots of moving parts requires increased
coordination
• Complexity of testing / deploying /
operating a distributed system
• Cultural transformation
89. Principles of Microservices
1. Rely only on the public API
Ÿ Hide your data
Ÿ Document your APIs
Ÿ Define a versioning strategy
2. Use the right tool for the job
Ÿ Container journey? (use ECS)
Ÿ Polyglot persistence (data layer)
Ÿ Polyglot frameworks (app layer)
3. Secure your services
Ÿ Defense-in-depth
Ÿ Authentication/authorization
6. Automate everything
Ÿ Adopt DevOps
4. Be a good citizen within the ecosystem
Ÿ Have SLAs
Ÿ Distributed monitoring, logging, tracing
5. More than just technology transformation
Ÿ Embrace organizational change
Ÿ Favor small focused dev teams