42
1 MYTHS OF MICROSERVICES Nima Montazeri @nimamon

Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

1

MYTHS OF MICROSERVICESNima Montazeri @nimamon

Page 2: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

TONIGHT…

Definitions & Characteristics

Microservices Premium

Where to use Microservices

When to use Microservices

Q&A

@nimamon

Page 3: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

RESOURCES

@nimamon

http://nima.tech/micro-services/

Page 4: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently
Page 5: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

QUESTION OF COMPLEXITY

SOA

4X4 Rubik’s Cube

7.40 x 10 45

7401196841564901869874093974498574336000000000

Page 6: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently
Page 7: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

QUESTION OF COMPLEXITY

SOA

2X2 Rubik’s Cube

only(!) 3.7 x 106

x 8

29,600,000

Page 8: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

QUESTION OF COMPLEXITY

SOA

7401196841564901869874093974498574336000000000

x 8 29,600,000

Page 9: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

QUESTION OF COMPLEXITY

SOA

4 x 1035 times simpler

x 8

Page 10: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

Microservices

Chart by Google Trends

Page 11: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

http://microservices.org

Page 12: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

Microservices vs SOA

Chart by Google Trends

SOA

Microservices

Page 13: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

ARE MICROSERVICES JUST SOA?

SOAMicroservices

useful subset of SOA practices

Page 14: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

DEFINITION OF MICROSERVICESCharacteristics

Page 15: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

DEFINITION OF MICROSERVICES

SOA

Characteristics

Componentization via Services

Idea has been around for decades

Replace and/or upgrade independently

Services as components

Page 16: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

DEFINITION OF MICROSERVICES

SOA

Characteristics

Independent Data Storage

Page 17: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

DEFINITION OF MICROSERVICES

SOA

Characteristics

Infrastructure Automation

Provision new machines in minutes not weeks

Cloud Infrastructure

Automate build, test and deployment

Page 18: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

DEFINITION OF MICROSERVICES

SOA

Characteristics

Design for Failure

Services are going to fail

Resiliency over availability

Monitoring and troubleshooting

Page 19: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

DEFINITION OF MICROSERVICES

SOA

Characteristics

Organised around Business Capabilities

Page 20: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

DEFINITION OF MICROSERVICES

SOA

Characteristics

Organised around Business Capabilities

Page 21: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

DEFINITION OF MICROSERVICES

21

SOA

Characteristics

Organised around Business Capabilities

Page 22: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently
Page 23: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

23

Page 24: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently
Page 25: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

MICROSERVICES PREMIUM

Operational Complexity is the biggest problem

Lots of Manual Testing, massive UI testing suit

Beware of Deployment Dependency trap

Infrastructure Complexity

UI Composition

Page 26: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

MICROSERVICES PREMIUM

Having strong module bounders is a big benefit of Microservices

Deciding on these boundaries this can turn into a massive nightmare

Service Boundaries

Page 27: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

MICROSERVICES PREMIUM

Refactoring a concept that spans across multiple smaller services is hard

Higher Cost of Refactoring 

Page 28: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

CHARACTERISTICS & PREMIUM

Componentization via Services

Independent Data Storage

Infrastructure Automation

Design for Failure

Organised around Business Capabilities

Infrastructure Complexity

Higher Cost of Refactoring 

Service Boundaries

Page 29: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

WHERE TO USE MICROSERVICES?

Microservices are suitable for very complex systems

Don't even consider microservices unless you have a system that's too complex to manage as

a monolith.

Page 30: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

WHERE TO USE MICROSERVICES?

You shouldn't start a new project with

microservices, even if you're sure your

application will be big enough to make it

worthwhile!

Page 31: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

MONOLITH FIRST STRATEGY

Page 32: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

WHERE TO USE MICROSERVICES?

Productivity

Complexity

Page 33: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

MONOLITH-FIRST STRATEGY

Paying attention to modularity within the software, both at the API boundaries and how the data is stored

Do this well, and it's a relatively simple matter to make the shift to microservices.

Page 34: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

MONOLITH-FIRST STRATEGY

Customer

Product Catalog

Order

Customer

Order

Product

Page 35: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

MONOLITH-FIRST STRATEGY

Customer Service Product ServiceOrder Service

Customer Order Product

Page 36: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

WHEN?

Three stages of a project

Problem/Solution Fit

Product/Market Fit Scale

Focus: Learning and Validation Focus: Growth and Optimisation

Page 37: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

WHEN?

Technical: Are we mature in our CD practices?

Organisational: Can we organise our teams around business capabilities?

Product: Do we have product/market fit?

It depends…

Page 38: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

BROWN FIELD

38

Module A

Module C

Module B

Page 39: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

BROWN FIELD

Module A

Module C

Service B

Page 40: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

BROWN FIELD

Service A Service CService B

Page 41: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

This is a journey

Expect to change team structure more than once

Expect to continue to refine architecture.

Be comfortable with continuous change.

Page 42: Myths of Microservices - WordPress.com · DEFINITION OF MICROSERVICES SOA Characteristics Componentization via Services Idea has been around for decades Replace and/or upgrade independently

42

THANK YOU!

http://nima.tech/micro-services@nimamon