Architecting for Scale using Microservices & Serverless Backends

17
Architecting for Scale using Microservices & Serverless Backends Yuval Fernbach, Solutions Architect Yaniv Donenfeld, Solutions Architect

Transcript of Architecting for Scale using Microservices & Serverless Backends

Page 1: Architecting for Scale using Microservices & Serverless Backends

Architecting for Scale using Microservices & Serverless BackendsYuval Fernbach, Solutions ArchitectYaniv Donenfeld, Solutions Architect

Page 2: Architecting for Scale using Microservices & Serverless Backends

SpoTaxi

Page 3: Architecting for Scale using Microservices & Serverless Backends

SpoTaxi

Page 4: Architecting for Scale using Microservices & Serverless Backends

Agenda

• From monolithic to microservices… and containers

• EC2 Container Service overview

• Cluster Management and scheduling

• Integration with other AWS services

Page 5: Architecting for Scale using Microservices & Serverless Backends

The Story of Amazon.com

Monolithic Application Services Microservices

Page 6: Architecting for Scale using Microservices & Serverless Backends

The Move To Microservices Is Assisted By The Rise of Containers

• Small functional building blocks as output of the development

process

• Minimizing dependency and reducing complexity of dependency

management

Page 7: Architecting for Scale using Microservices & Serverless Backends

Amazon ECS

EC2 INSTANCES

LOADBALANCER

InternetECS

AGENT

TASK

Container

TASK

Container

ECS AGENT

TASK

Container

TASK

ContainerAGENT COMMUNICATION

SERVICE

Amazon ECS

API

CLUSTER MANAGEMENT ENGINE

KEY/VALUE STOREECS

AGENT

TASK

Container

TASK

Container

LOADBALANCER

Page 8: Architecting for Scale using Microservices & Serverless Backends

Core Benefits

• Built-in cluster state management system

• Deep Integration with other AWS services

Page 9: Architecting for Scale using Microservices & Serverless Backends

Deep Integration With Other AWS Services• Elastic Load Balancing

• Amazon Elastic Block Store

• Amazon Virtual Private Cloud

• Amazon CloudWatch

• AWS Identify and Access Management

• AWS CloudTrail

Page 10: Architecting for Scale using Microservices & Serverless Backends

IAM Roles For Tasks

DynamoDB

ECS Cluster

EC2 Instance EC2 Instance

TASK A

TASK B

TASK B

S3 Storage

Page 11: Architecting for Scale using Microservices & Serverless Backends

Automatic Service Scaling

AMAZON ECS

Publish metrics

AMAZON CLOUDWATCH

ELASTIC LOAD BALANCING

Auto Scaling ECS service

Availability Zone A

Availability Zone B

TASK A

Add/remove ECS tasks

TASK CTASK B

Scale in /Scale outpolicies

Page 12: Architecting for Scale using Microservices & Serverless Backends

Application Load Balancer

High performance load balancing for applications

Page 13: Architecting for Scale using Microservices & Serverless Backends

High-performance Load Balancing Of Applications

• Path-based routing

• Dynamic Port Mapping

• HTTP/2

• WebSockets

• Detailed logging

Page 14: Architecting for Scale using Microservices & Serverless Backends

Application Load BalancerECS Service

ALB ECS Service

/ws/api/bidstatus

/

Task

ECS Service

Bid API

Web PageTask

Page 15: Architecting for Scale using Microservices & Serverless Backends

Demo

Page 16: Architecting for Scale using Microservices & Serverless Backends

SpoTaxi

Page 17: Architecting for Scale using Microservices & Serverless Backends