Production Ready Microservices

SRE Meetup, Paris 10 Juillet 2018

Amine Ben Asker

Cloud Architect
Automation enthusiast

Sysadmin

Devops

DEV (Java, Javascript, Python, Go ...)

Management :p

Distributed systems are Hard

Conway's Law

Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure.

Forget Conway’s Law, distributed systems at scale follow Murphy’s Law: “Anything that can go wrong, will go wrong.”

Conway's Law

Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure.

"If you can't monitor a service, you don't know what's happening, and if you're blind to what's happening, you can't be reliable" SRE, Google

Why it's hard ?

Services may unexpectedly restart, changing their state or their version

Distributed systems must be designed to be resilient by accepting that all possible errors are just business as usual.

Introduce useful constraints, do everything gradually

Can your customers live with slower responses or lower scale for a while?

You could design a smaller, slower, simpler system first and only add more complexity as you build expertise

The Microservice Ecosystem

  • Do not live in isolation

  • Are part of an application

  • Are abstracted away from all infrastructure

Four-layer model of the microservice ecosystem

Layer  1: Hardware

Layer 2: Communication

Layer 3: The Application Platform

Layer 4: Microservices

 The Hardware Layer

 

  • The physical servers (owned by the company or rented from cloud providers)

  • Databases (dedicated and/or shared)

  • The operating system

  • Resource isolation and abstraction

  • Configuration management

  • Host-level monitoring

  • Host-level logging

 The Communication Layer

 

  • Network, DNS

  • RPCs, endpoints, and messaging

  • Service discovery, service registry, and load balancing

 The Application Platform Layer

 

  • Self-service internal development tools

  • Development environment

  • Test, package, build, and release tools

  • Deployment pipeline

  • Microservice-level logging

  • Microservice-level monitoring

The Microservice Layer

 

  • The microservices

  • All microservice-specific configurations

REMEMBER

You cannot escape the fact that the system will fail. You can only do your best to prepare for when it does.

Common Dependency Failure Scenarios

  • Internal service outages

  • External (third-party) service outages

  • Internal library failures

  • External (third-party) library failures

  • A dependency failing to meet its SLA

  • API endpoint deprecation

  • API endpoint decommissioning

  • Microservice deprecation

  • Microservice decommissioning

  • Interface or endpoint deprecation

  • Timeouts to a downstream service

  • Timeouts to an external dependency

Common Microservices Failure Scenarios

  • Incomplete code reviews

  • Poor architecture and design

  • Lack of proper unit and integration tests

  • Bad deployments

  • Lack of proper monitoring

  • Improper error and exception handling

  • Database failure

  • Scalability limitations

Designed to

The four types of production-ready code testing

  • Lint tests

  • Unit tests

  • Integration tests

  • End-to-end tests

Production-Ready Microservices

by Susan J.Fowler

Thanks

Follow me @asker_amine

Questions

production-ready-microservices

By Yuri Laaziz

production-ready-microservices

  • 515
Loading comments...

More from Yuri Laaziz