34

Migrating monolithic applications with

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Migrating monolithic applications with
Page 2: Migrating monolithic applications with

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Migrating monolithic applications with the strangler pattern

F S I 3 0 2

Christopher Marsh-Bourdon

CIO of Development and Enablement

Wells Fargo

Kenneth Jackson

Principal Solutions Architect

Global Financial Services

Amazon Web Services

Page 3: Migrating monolithic applications with

Agenda

• Common migration drivers

• Problem space: Monoliths in financial services

• Current strategies

• Strangler pattern strategy

• Takeaways

Page 4: Migrating monolithic applications with

Cost

reduction

Acquisitions

or divestitures

Large-scale compute-

intensive workloadsFacility or real-estate

decisions

Colocation

or outsourcing

contract changes

Common migration drivers

Data center

consolidation

Digital

transformation Agility/dev

productivity

Page 5: Migrating monolithic applications with

Monoliths in financial services

.NET and

other

24%

COBOL

36%

Java-EE

40%

Technology distribution

0%

2%

4%

6%

8%

10%

12%

14%

16%

18%

20%

Below

10K

> 10 -

20K

> 20 -

50K

> 50 -

100K

> 100 -

200K

> 200 -

500K

> 500 -

1M

> 1M

Application size

KLOC

CRASH Report Financial Services 2016

Page 6: Migrating monolithic applications with

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 7: Migrating monolithic applications with

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

“We find that many early cloud projects gravitate toward net new development using cloud-native capabilities, but in a large legacy migration scenario where the organization is looking to scale its migration quickly to meet a business case, we find that the majority of applications are rehosted.”

Stephen Orban

Head of Enterprise Strategy, AWS

Author, Ahead in the Cloud

Page 8: Migrating monolithic applications with

The 6 R’s: Application migration strategies

Redesign

application/

infrastructure architecture

Application code

development

Full ALM/

SDLC

Integration

Purchase COTS/

SaaS & licensing

Manual install

& setup

Modify underlying

infrastructure

Determine

new platform

Retain/

revisit

Manual config

Manual deploy

Manual install

Retire/

decommission

Discover/assess/prioritize

applications

Determine

migration

path

Use migration tools

Transition ProductionValidation

Automate

Page 9: Migrating monolithic applications with

Comparison of migration strategiesEffort (time & cost) Opportunity to optimize

Retire N/A N/A

Retain N/A

Re-host

Re-purchase

Re-platform

Re-architect

Page 10: Migrating monolithic applications with

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 11: Migrating monolithic applications with

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

“An alternative route is to gradually create a new system around the edges of the old, letting it grow slowly over several years until the old system is strangled.”

Martin Fowler

Chief Scientist, ThoughtWorks

Page 12: Migrating monolithic applications with

Corporate data center

Monolith

AWS Cloud

VPC

Availability

Zone 1

Availability

Zone 2

Web and

app layer

Amazon EC2

instances

ELB

Amazon RDS

master

Database

layer

Synchronous

replication

RDS

standby

Region

Users

Auto Scaling

groupEC2

instances

Step 1: Re-host application

Page 13: Migrating monolithic applications with

Corporate data center

Monolith

AWS Cloud

VPC

Availability

Zone 1

Availability

Zone 2

Synchronous

replication

RDS

standby

Region

Users

EC2

instances

Step 1: Re-host application

Amazon EC2

instances

ELB

Amazon RDS

master

Auto Scaling

group

Web and

app layer

Database

layer

Page 14: Migrating monolithic applications with

Step 2: Facade with Amazon API Gateway

AWS Cloud

VPC

Availability

Zone 1

Availability

Zone 2

Region

Users

API

Gateway

EC2

instances

ELB

Amazon RDS

master

Synchronous

replication

RDS

standby

Auto Scaling

groupEC2

instances

Web and

app layer

Database

layer

Page 15: Migrating monolithic applications with

Step 2: Facade with Amazon API Gateway – Setup

Page 16: Migrating monolithic applications with

AWS Cloud

VPC Availability

Zone 1

Availability

Zone 2

Region

Users

API

Gateway

Amazon

CloudWatch

EC2

instances

ELB

Amazon RDS

master

Synchronous

replication

RDS

standby

Auto Scaling

groupEC2

instances

Step 3: Detect & measure hot spots

Web and

app layer

Database

layer

Page 17: Migrating monolithic applications with

Step 3: Detect & measure hot spots

AWS Cloud

VPC Availability

Zone 1

Availability

Zone 2

Region

Users

API

Gateway

AWS X-Ray

EC2

instances

ELB

Amazon RDS

master

Synchronous

replication

RDS

standby

Auto Scaling

groupEC2

instances

Web and

app layer

Database

layer

Page 18: Migrating monolithic applications with

AWS Cloud

VPC

Region

Users

API

Gateway

Lambda function hot

spot 1

EC2

instances

ELB

Amazon RDS

master

Synchronous

replication

RDS

standby

Auto Scaling

groupEC2

instances

AWS Database

Migration ServiceAmazon

DynamoDB

Step 4: Create AWS Lambda for top hot spot

Web and

app layer

Database

layer

Page 19: Migrating monolithic applications with

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 20: Migrating monolithic applications with

Wri

te

Re

ad

Synchronize

Use case(s)

• Data structure stays

consistent

• Data content stays

consistent

• Eventual consistency

acceptable

• Batch synchronize

• Golden copy remains with

old database

Old New

Monolith Strangler

Synchronization technology(s)

• Triggers

• AWS Database

Migration Service

• Generic batch process

Re

ad

L-shaped pattern

Page 21: Migrating monolithic applications with

Wri

te

Re

ad

Synchronize

Use case(s)

• Data structure differs

• Data content is expanded

upon

• Eventual consistency

acceptable

• Batch synchronize

• Golden copy for expanded

schema to new database

and remains with existing

data in the old database

Old New

Monolith Strangler

Synchronization technology(s)

• Events

• AWS Database Migration

Services

• Generic batch process

Re

ad

Backwards L-shaped pattern

Page 22: Migrating monolithic applications with

Wri

te

Re

ad

Old New

Monolith Strangler

Re

ad

Use case(s)

• Data structure

differs

• Data content is

expanded upon

• Immediate

consistency

required

• Golden copy

moves for the

expanded data to the new database and remains with existing data in the old database

Synchronization

technology(s)

• Amazon SQS

• Amazon Kinesis

• Amazon MQ

• Amazon MSK

• AWS Lambda

• Generic queue

process

Inverted Y-shaped pattern

Page 23: Migrating monolithic applications with

Wri

te

Use case(s)

• Data structure remains

consistent

• Data content remains

consistent

• Immediate consistency

required

• Golden copy remains

with old, and only,

database

Old

Monolith Strangler

Synchronize technology(s)

• Amazon ElastiCache

• Generic caching

Re

ad

Slanted V-shaped pattern

Page 24: Migrating monolithic applications with

AWS Cloud

VPC

Region

Users

API

Gateway

Lambda function hot

spot 1

EC2

instances

ELB

Amazon RDS

master

Synchronous

replication

RDS

standby

Auto Scaling

groupEC2

instances

Amazon

DynamoDB

AWS Database

Migration Service

Function

invocations

Step 5: Canary release

Web and

app layer

Database

layer

Page 25: Migrating monolithic applications with

Step 5: Canary release – Setup

Page 26: Migrating monolithic applications with

X-Ray canary service map

Page 27: Migrating monolithic applications with

Step 6: Iteratively strangulate

AWS Cloud

VPC

EC2

instance

EC2

instance

ELB

Amazon RDS

master

Synchronous

replication

RDS

standby

Region

Users

Auto Scaling

group

API

Gateway

Lambda function

hot spot 1

Function

invocations

DynamoDB

EC2

instances

ELB

Amazon AuroraAWS Database

Migration

Service

Web and

app layer

Database

layer

Page 28: Migrating monolithic applications with

Step 7: “Not with a bang but a whimper”

AWS Cloud

VPC

ELB

Region

Users

API

Gateway

Lambda function

hot spot 1

DynamoDB

EC2

instances

ELB

AuroraRDS

AWS

Fargate

Function

invocations

Page 29: Migrating monolithic applications with

Step 7: ”Not with a bang but a whimper”

AWS Cloud

VPC

Region

Users

API

Gateway

ELB

API

Gateway

Lambda function hot

spot 1

Function

invocations

DynamoDB

EC2

instances

ELB

AuroraRDS

Fargate

Page 30: Migrating monolithic applications with

Comparison of migration strategies (updated)Effort (time & cost) Opportunity to optimize

Retire N/A N/A

Retain N/A

Re-host

Re-purchase

Re-platform

Re-architect

Strangler

Page 31: Migrating monolithic applications with

Takeaways

• “Just move it”1 (Jim Scholefield, Nike Global CIO) is often good advice

• Customers have seen 25%-30% saves without going “cloud native”

• Re-hosting offers lowest time to value and is a platform for more value

• Re-architecting might be appropriate for applications with a bright future

• Consider the strangler pattern to realize that value incrementally

• AWS services like API Gateway and Lambda are accelerators

• And, they don’t require you to “spend to save” – no extra infrastructure

• Leverage canaries and other modern techniques to validate new features

Page 32: Migrating monolithic applications with

Additional resources

AWS Migration Whitepaper

https://d1.awsstatic.com/whitepapers/Migration/aws-migration-whitepaper.pdf

AWS Training: Advanced Developing on AWShttps://www.aws.training/training/schedule?courseId=36896

AWS re:Invent 2016: From Monolithic to Microservices: Evolving Architecture Patterns (ARC305)

https://www.youtube.com/watch?v=oRIYtOsAlzk

AWS re:Invent 2018: Mainframe Modernization with AWS: Patterns and Best Practices (GPSTEC305)

https://www.youtube.com/watch?v=AJ88gY1w9NA

Strangling the Monolith With a Data-Driven Approach –David Julia, Simon Duffy (Pivotal Software, Inc.)

https://www.youtube.com/watch?v=P7mM6TA75x4

Page 33: Migrating monolithic applications with

Thank you!

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Page 34: Migrating monolithic applications with

© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.