4 Edge and Hybrid Storage
4 Edge and Hybrid Storage
on AWS
Sascha Möllering
Solutions Architect, @sascha242, Amazon Web Services Germany GmbH
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Why are we
here today?
https://secure.flickr.com/photos/mgifford/4525333972
Agenda
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What is Reactive Architecture?
What is Reactive Architecture?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
N-Tier architecture
Frontend Storage
Servers API
User waits
for update Poll Poll
Queries
Database
Synchronous
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Software moves
faster today
Traditional style of
applications cannot deliver
on these requirements any
longer
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Reactive Applications
Responsive
Elastic Resilient
Message-driven
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Reactive Architecture
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Reactive Architecture
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Reactive Architecture
• Loosely coupled
• Location independent
• Easy to extend and maintain
• Push-based
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Microservices
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Microservices should be
stateless.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
No shared libraries or
shared SDKs.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Avoid
Host-Affinity.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Use lightweight
protocols for
communication.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Use mechanisms for
registration.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How to build Reactive Architectures
on AWS?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Example use case
Banner
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
High Level Architecture
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Data Collection
Amazon Elastic
Container Registry
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
High Level Architecture
• Amazon ECS and Docker used for the main
application
• Fargate launch type
• Resiliency and elasticity implemented by
using auto scaling
Amazon Elastic
Container Service
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
High Level Architecture
• AWS Lambda functions consume messages
• Persist data in NoSQL-store
• Update core-data in Redis
• Send notifications to main application
• Resiliency and scalability part of the service
AWS Lambda
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
High Level Architecture
• Amazon Kinesis Data Streams used to
decouple components
• Asynchronously push event data to NoSQL-
store
• Update core-data in Redis
Amazon Kinesis
Data Streams
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
High Level Architecture
• Amazon ElastiCache with Redis 3 engine
• Multi-AZ setup with failover and one shard
• Used to store core-data
• Notification channel
• Redis supports pub/sub
Amazon ElastiCache
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
High Level Architecture
• Amazon DynamoDB NoSQL-store used to
persist event-data
• Backup and restore
• Encryption at rest
Amazon DynamoDB
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Application Architecture
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Data Collection
Amazon Elastic
You are here now!
Container Registry
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Application Architecture
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Application Architecture
Source: http://vertx.io/docs/guide-for-java-devs/
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Application Architecture
Source: http://vertx.io/docs/guide-for-java-devs/
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Application Architecture
Source: http://vertx.io/docs/guide-for-java-devs/
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Application Architecture
• HttpVerticle: exposes HTTP endpoint
• CacheVerticle: implements L1 cache
• RedisVerticle: implements Redis access
• KinesisVerticle: messages to Amazon Kinesis Data
Stream
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Subscribe to event bus
Convert data
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Application Architecture
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Consume
Subscribe to EB
data from
event bus
Send data to
cache verticle
Subscribe to
Redis channel
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Data Collection You are here now!
Amazon Elastic
Container Registry
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Application Architecture
AWS Lambda
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Lambda considerations and best practices
AWS Lambda is stateless—architect accordingly
• Assume no affinity with underlying compute
infrastructure
• Local filesystem access and child process may not
extend beyond the lifetime of the Lambda request
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Iterate over
batch of events
Unmarshal
protobuf messages
Map to struct
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Design principles
• Use push instead of pull
• Avoid blocking calls
• Decouple your services using async message passing
• Keep state in managed services
• Use caching
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Deployment
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Deployment
AWS CloudFormation
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
S3 Bucket
and
Lambda function filename
configuration
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Network
mode
ECS
Launch
Type
CPU and
RAM
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Go build something!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Related Sessions
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Question? Ask this guy
at the Ask an Architect
booth:
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Please complete the session
survey in the summit mobile app.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.