Weitere ähnliche Inhalte Ähnlich wie Serverless: costruire applicazioni native per il cloud (20) Mehr von Amazon Web Services (20) Serverless: costruire applicazioni native per il cloud1. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverless: build cloud native application
16/05/2019
2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Microservices allow you to decompose for agility
3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Microservices eliminate the need to focus
on infrastructure as your critical differentiator
Installing, configuring, and managing
my compute infrastructure is critical
to achieving my goals
10%
Having a standardized, flexible, and
on-demand compute environment
is critical to achieving my goals
90%
4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon views serverless as the native architecture
of the cloud
Source: Digital Rewrites The Rules Of Business, Forrester, February 2018
No provisioning,
no management
Automatic
scaling
Pay for
value
Highly available
and secure
5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
C O M P U T E
D A T A B A S E S
S T O R A G E
M E S S A G I N G
A N A L Y T I C S
More
operations
Less
operations
Serverless is an operational construct
Source: Digital Rewrites The Rules Of Business, Forrester, February 2018
VM
ON-PREM
EC2
ECS/EKS
FARGATE
LAMBDA
ELASTIC
BEANSTALK
MYSQL
ON-PREM
STORAGE
ON-PREM
EBS
ON-PREM
HADOOP
ON-PREM
ATHENA
SNS/SQS
STEP
FUNCTIONS
S3 DYNAMODB
MYSQL
ON EC2
RDS ON
MYSQL
AMAZON
REDSHIFT
RDS
AURORA
AURORA
SERVERLESS
AMAZON
MQ
HADOOP
ON EC2
EMR
AMAZON ES
6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Options for architecting your microservices
AWS Lambda
Amazon EKS
Amazon ECS
AWS Fargate
Containers Serverless
7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Containers: ECS, EKS, Fargate
• Platforms to run containerized applications on AWS
• Easily run and scale applications to meet your needs
• Native integration with other AWS services
• Pairs well with CI/CD
• Benefits
• Portability
• Control
• Rich ecosystem
8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS container web architecture
VPC
Availability Zone A Availability Zone B
Public Subnet
Private Subnet
Public Subnet
Private Subnet
NAT Gateway NAT Gateway
ECS Cluster
Auto Scaling Group
Instances Instances
Internet
Gateway
9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
SERVICES (ANYTHING)
Changes in
data state
Requests to
endpoints
Changes in
resource state
EVENT SOURCE FUNCTION
Node.js
Python
Java
C#
Go
PowerShell
Ruby
Serverless Computing
10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverless: Lambda
• Platform to run code without thinking about servers
• Our definition
• No servers to provision or manage
• Scales with usage
• Never pay for idle
• High availability built in, fault tolerance made easier
• Native integration with other AWS services
• Benefits
• Event-driven framework
• Multiple invocation models
• Opinionated
11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS serverless web architecture
AWS Cloud
12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Architectural considerations
• Custom code & services: Build
your own environment
• Numerous choices
• Requires management and
orchestration*
• Standardized choices
• Opinionated approach drives
scalable platform
• Security and scaling
managed by AWS
• Serverless and
“containerless”
Containers Serverless
* - Fargate changes this model
13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Other considerations
• Wide array of power options
• Power level managed by container,
scoped by host
• Fargate offers streamlined model
• Multiple networking modes
• Mature tooling
• Easy power level selection
• 128MB to 3GB
• Network and CPU assigned
proportionally
• Can overwhelm backends
• Developing tooling
• Organizational readiness?
Containers Serverless
* - Fargate changes this model
15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Ideas on selecting … containers
When you need …
• Lower startup latency
• Support for long running compute jobs (> 15 minutes)
• Predictable, high traffic usage
• Persistence of data
When you want …
• Complete control of compute environment
• But not just for the sake of control
16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Ideas on selecting … serverless
When you need …
• To trigger action on an event
• Support for varying utilization
• Ability to handle unknown demand
When you want to …
• Quickly prove business value
• Hand operational complexity (for example, patching, scaling) to AWS
• Make fewer decisions
17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What if I can’t decide?
18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Runtime environment
compatible with AWS
Lambda?
.NET Core, Go, Java, Python,
or Node.js
Unknown
demand and
below RPS
breakeven
Inter-container
communication*
or storage-
intensive?
Desire orchestration
portability OR open
source fan?
Amazon EKS
Are you comfortable
managing your own
infrastructure?
Amazon ECSAWS Fargate
Deployment
Package size
<= 50MB
Desired Service
runtime <= 15
minutes?
AWS Lambda
Decision Tree – well, almost!
20. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
API Gateway integrations
Internet
Mobile Apps
Websites
Services
API Gateway
Cache
Endpoints on
Amazon EC2
Any other
AWS service
Regional API Endpoints
All publicly
accessible
endpoints
AWS Cloud YOUR VPC
21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon API Gateway
Enables best practices for distributed systems
• Throttling
• Retry with exponential fallback
• Fail fast
Support for public and private services
22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS AppSync
Enables data-driven, real-time apps
• Multiple data sources, one endpoint
• Client specifies payload
• Subscription to latest data
23. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS X-Ray
Delivers insight into distributed applications
• Uncover application issues
• Improve application performance
• Ready for ECS, Lambda, and more
24. Thank you!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Containers: https://aws.amazon.com/containers/
Serverless: https://aws.amazon.com/serverless/