waking up in weeds of microservices. how to diagnose your ... · microservice architecture brings...

15
Waking up in weeds of microservices. How to diagnose your first bug?

Upload: others

Post on 11-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Waking up in weeds of microservices. How to diagnose your ... · Microservice architecture brings some known tradeoff with implementation • Can be reduced using best practices like

Waking up in weeds of microservices. How to

diagnose your first bug?

Page 2: Waking up in weeds of microservices. How to diagnose your ... · Microservice architecture brings some known tradeoff with implementation • Can be reduced using best practices like

LICENSE

• Creative commons attribution-

noncommercial- 3.1 unported

• https://creativecommons.Org/licenses/by-

nc/4.0/

Page 3: Waking up in weeds of microservices. How to diagnose your ... · Microservice architecture brings some known tradeoff with implementation • Can be reduced using best practices like

WHO AM I • Senior Software Engineer at Adobe Inc.

• Interested in open-source, cloud and technology

evangelism

• Experienced in various Full stack technologies (UI

to backend with DevOps added latest in armory)

• OS Contributor to various open source and Apache

products (eg: Hystrix, Spinakker, Spring etc.) and

reviewer in various JSRs

• President, founder and member of various

organizations/groups

• Sunnyvale Java User Group

• San Francisco Java User Group

• Google Developer Group (SF Edition)

• Java Community Program

Page 4: Waking up in weeds of microservices. How to diagnose your ... · Microservice architecture brings some known tradeoff with implementation • Can be reduced using best practices like

OUR OBJECTIVE

• To get you excited about some aspects which are not covered while switching to microservices

• To make microservice architecture more manageable

Is:

• branding/forcing to us any particular tool Isn’t:

Page 5: Waking up in weeds of microservices. How to diagnose your ... · Microservice architecture brings some known tradeoff with implementation • Can be reduced using best practices like

AGENDA

• Let’s go to microservice

• They say, “GREAT POWER COMES WITH GREATER

RESPONSIBILITY”, is it?

• Are you ready to take the bluepill (hype driven development]

• Traditional world: I need more control beforehand

• Overcoming the challenges

• Time to see results

• Next steps

Page 6: Waking up in weeds of microservices. How to diagnose your ... · Microservice architecture brings some known tradeoff with implementation • Can be reduced using best practices like

LET’S GO TO MICROSERVICES

• I heard about microservices

• Good architecture pattern

• Polyglot persistence

• Easy to maintain (supposedly)

• Scalable and resilient

• Atomic components, that are decoupled

YAY J

OK, I guess then we should implement this.

Page 7: Waking up in weeds of microservices. How to diagnose your ... · Microservice architecture brings some known tradeoff with implementation • Can be reduced using best practices like

THEY SAY “GREAT POWER COMES WITH GREATER RESPONSIBILITY”, IS IT?

• I am done with breaking my architecture from monolith to

microservices. What next?

• I do not know where it will sit.

• It still takes so much time to deploy.

• Failure of one still affects another

Page 8: Waking up in weeds of microservices. How to diagnose your ... · Microservice architecture brings some known tradeoff with implementation • Can be reduced using best practices like

ARE YOU READY TO TAKE THE BLUEPILL (HYPE DRIVEN DEVELOPMENT]

• Containers

• Container Orchestration

• Circuit breakers/resiliency

• Service discovery

• Automated deployment and Testing

• Spinnaker and Self Service capabilities

• More Observability and monitoring****

Page 9: Waking up in weeds of microservices. How to diagnose your ... · Microservice architecture brings some known tradeoff with implementation • Can be reduced using best practices like

TRADITIONAL WORLD: I NEED MORE CONTROL BEFOREHAND

• Traditional monitoring model are pull based where before pulling

the data you need to tell controller where they are sitting.

• This fails once you go to microservice container architecture as

ports and host are assigned dynamically.

Page 10: Waking up in weeds of microservices. How to diagnose your ... · Microservice architecture brings some known tradeoff with implementation • Can be reduced using best practices like

EC

S

OVER COMING THE CHALLENGES : AN ATOMIC APPROACH

… API n

EC2

API 1

… API 2 API n

EC2

ECS

Pulls metrics

data from SQS

Pushes metrics

data to SQS

API 1 API 2

ECS

Note: Only one way is subscription is shown here.

However we can subscribe/use metrices into different

mechanisms, viz Kafla, RabbitMq etc.

Page 11: Waking up in weeds of microservices. How to diagnose your ... · Microservice architecture brings some known tradeoff with implementation • Can be reduced using best practices like

SAMPLE RESULTS

Page 12: Waking up in weeds of microservices. How to diagnose your ... · Microservice architecture brings some known tradeoff with implementation • Can be reduced using best practices like

OK, WHAT DID WE LEARN?

• Microservice architecture brings some known tradeoff with

implementation

• Can be reduced using best practices like automated deployment,

circuit breakers, automated testing and better devops

• Monitoring is a first class citizen in Microservice architecture

• Make sure you monitor all factors consisting your architecture

starting from infrastructure to every living line of code

• More insight means more control

• Catch anomalies as soon as possible and take action

Page 13: Waking up in weeds of microservices. How to diagnose your ... · Microservice architecture brings some known tradeoff with implementation • Can be reduced using best practices like

IMPORTANT LINKS

• Dropwizard : https://www.dropwizard.io/1.3.5/docs/

• Micrometer: https://micrometer.io/

• Docker metrics:

https://docs.docker.com/config/containers/runmetrics/

• Grafana: https://grafana.com/

• influxdb: https://www.influxdata.com/

• Kafka: https://kafka.apache.org/

• Rabbitmq: https://www.rabbitmq.com/

Page 14: Waking up in weeds of microservices. How to diagnose your ... · Microservice architecture brings some known tradeoff with implementation • Can be reduced using best practices like
Page 15: Waking up in weeds of microservices. How to diagnose your ... · Microservice architecture brings some known tradeoff with implementation • Can be reduced using best practices like

THANK YOU !

• https://twitter.com/mukteshkrmishra

• https://www.linkedin.com/in/mukteshkrmishra/

Please do not forget to rate this talk. J