building resilient microservices

Post on 06-Apr-2017

370 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Building Resilient Microservices

Gurpreet S. SachdevaAricent

Who AM I?

• Java / Cloud Technology Enthusiast• Director – Technology @ Aricent, Gurgaon• Co-Founder Delhi/NCR JUG • I blog @ www.thistechnologylife.com • Java Code Geek partner• @gssachdeva• https://www.linkedin.com/in/gurpreets

What Exactly is a Microservice

The term "Microservice Architecture" has sprung up over the last few years to describe a particular way of designing software applications as suites of independently deployable services. While there is no precise definition of this architectural style, there are certain common characteristics around organization around business capability, automated deployment, intelligence in the endpoints, and decentralized control of languages and data.

http://martinfowler.com/articles/microservices.html

Microservice Properties

Microservice Polyglot Architecture

OPERATIONAL MATURITY IS VITALhttp://martinfowler.com/bliki/MicroservicePrerequisites.html

• Not all monoliths are bad applications

Traditional Application Architecture

• Easy to• Develop, Test, Deploy

Scale Cube

Y-Axis Scaling

• Apply X-axis and Z-axis scaling to each service independently

• Partitioning Strategies• Noun• Verb• SRP• Unix Utilities

Conway’s Law“Organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations”

- Melvin Conway, 1968

Can your teams be organized around microservices

Popular Examples

http://techblog.netflix.com ~ 600 serviceshttp://highscalability.com/amazon-architecture 100-150 services to build a pagehttp://www.addsimplicity.com/downloads/eBaySDForum2006-11-29.pdf http://queue.acm.org/detail.cfm?id=1394128

Monolith Firsthttp://martinfowler.com/bliki/

MonolithFirst.html

Microservices – Inner & Outer Architecture

Microservices – Inner & Outer Architecture

Facets of Monitoring

12 Factor App Principles

Design for Failure• Failure will ALWAYS occur• Dependent services may be

unavailable or too slow to respond• Horizontal clustering• Resilience Patterns to the rescue• CicuitBreaker, Bulkhead,

Caching, Timeout, Retry, Messaging, etc.

Netflix OSS Projects

Over 100 NetflixOSS projects @ netflix.github.com

Cloud Foundry to Rescue• Many moving parts• Orchestration => Cloud Foundry

Data Strategy• Multiple microservices NOT to share the same

database model and perform updates on it• Separation of at least read/write access• Ideally: Separate data stores for each service

Inter-Service Communication• In a monolith architecture, most of the

communication is synchronous• Synchronous communication• Mostly REST is used, Other choices: Protocol

Buffers, thrift• May require asynchronous communication as well• ZeroMQ, RabbitMQ, Kafka

How to Test?

http://martinfowler.com/articles/microservice-testing

Continuous Delivery• Reliable Software Releases through

Build, Test and Deployment Automation

• DONE = Shippable into Production

Continuous Integration Tool Set

Prepare for DevOps

Devops (From Verticals to collaborative teams)

Spring Boot• Opinionated Spring application architecture -

Convention over Configuration• Production-ready features, externalized

configuration, metrics and health checks• Spring Cloud – Umbrella project for cloud

connectors, on top of Spring Boot

Take AwaysMicroservices aren’t micro!Everything comes at a priceNo framework is a silver bullet

THANK YOU

top related