living with microservices at pipedrive

37
Living with microservices @Pipedrive Renno Reinum A developer’s best friend

Upload: renno-reinurm

Post on 08-Feb-2017

3.432 views

Category:

Engineering


1 download

TRANSCRIPT

Page 1: Living with microservices at Pipedrive

Living with microservices@Pipedrive

Renno ReinumA developer’s best friend

Page 2: Living with microservices at Pipedrive

KerberosThe Guard of Underworld

Deploy or not to deploy

That is the question

Page 3: Living with microservices at Pipedrive

● Pipedrive helps small businesses control the complex selling process

● Founded in 2010● 30,000 paying customers worldwide● 170+ employees● Office in Tallinn and Tartu

New York, NY

Page 4: Living with microservices at Pipedrive

● 20,000+ simultaneous online users

Page 5: Living with microservices at Pipedrive

● 20,000+ simultaneous online users

● 800+ API req/sec

Page 6: Living with microservices at Pipedrive

● 20,000+ simultaneous online users

● 800+ API req/sec

● 400,000+ incoming emails per day

Page 7: Living with microservices at Pipedrive

● 20,000+ simultaneous online users

● 800+ API req/sec

● 400,000+ incoming emails per day

● Started with Node.js based microservices, reactive

architecture in 2012

Page 8: Living with microservices at Pipedrive

● 20,000+ simultaneous online users

● 800+ API req/sec

● 400,000+ incoming emails per day

● Started with Node.js based microservices, reactive

architecture in 2012

● In total, 500+ VMs/hosts/instances

Page 9: Living with microservices at Pipedrive

● 20,000+ simultaneous online users

● 800+ API req/sec

● 400,000+ incoming emails per day

● Started with Node.js based microservices, reactive

architecture in 2012

● In total, 500+ VMs/hosts/instances

● More than 300 deploys per month

Page 10: Living with microservices at Pipedrive

Pipedrive helps small businesses control the complex selling process

Page 11: Living with microservices at Pipedrive

Evolution of the application

The birth of monolith: Only kanban board

Page 12: Living with microservices at Pipedrive

Evolution of the application

New features added:Monolith growing

Page 13: Living with microservices at Pipedrive

Evolution of the application

Bloated monolith:Application slowing down

Page 14: Living with microservices at Pipedrive
Page 15: Living with microservices at Pipedrive

Once upon a time

● We need to keep the pace of delivering services!

● Teams need to be independent of each other● How can we add new features daily basis and

still maintain it?● Lets split it into microservices

Page 16: Living with microservices at Pipedrive

Introduction to Microservice

Developers should write programs that can communicate easily with other programs.

Break down projects into small, simple programs rather than overly complex monolithic programs.

Eric Raymond - Unix Philosophy

Page 17: Living with microservices at Pipedrive

Monolith vs Microservices

● Microservices systems are more flexible, loosely-coupled and scalable● Easier to develop and easier to change● More tolerant of failure. In case of one mircoservice fails, others should be

operational

http://www.randomant.net/the-cloud-is-a-paradigm-shift-in-software-dev/

Page 18: Living with microservices at Pipedrive

And the new era begins

Deployment of new microservice

From idea to production - minimum 2 WEEKS

Page 19: Living with microservices at Pipedrive

Characteristics of microservices (by Martin Fowler)

● Componentization via services

● Organized around business capabilities

● Products not projects

● Smart endpoints & dumb pipes

● Decentralized governance● Design for failure

● Infrastructure automation

Page 20: Living with microservices at Pipedrive
Page 21: Living with microservices at Pipedrive

Virtual Machines vs Containers (Docker)

http://www.docker.com/what-docker

Page 22: Living with microservices at Pipedrive

Visibility

Management

Interface

Page 23: Living with microservices at Pipedrive

Visibility

Management

Interface

Page 24: Living with microservices at Pipedrive

How not to create microservices or any other automation flows

● CI job hell● Discovery● Configurations hell

Page 25: Living with microservices at Pipedrive

Mindshift of Developers

● Building● Testing● Discovery● Monitoring● Logging● Alerting● Dashboards

Page 26: Living with microservices at Pipedrive

Agile Culturein Pipedrive

Agile and lean means small and fast and independent and in Pipedrive we operate by small cross-functional teams which deliver regularly. Those teams win small battles every day but their operations are supported by different types of other troops.

Page 27: Living with microservices at Pipedrive

Devops Culture

in Pipedrive

Page 28: Living with microservices at Pipedrive

Mindshift of Developers -Now I master the Microservice concept

● Dockerfiles● Docker-compose● CI builds● Tests● Service discovery● From idea to production

1 DAY

Page 29: Living with microservices at Pipedrive

CI processes with Docker● Provisioning of build

environment● Pulling Docker images● Docker builds

xkcd.com

Page 30: Living with microservices at Pipedrive

CI processes with Docker● Whole CI process can take a 1 - 3

minutes

xkcd.com

Page 31: Living with microservices at Pipedrive

CI processes with DockerFeedback from Developers:

● It’s still too sl.oOW

xkcd.com

Page 32: Living with microservices at Pipedrive

CI processes with DockerFeedback from Developers:

● It’s still too sl.oOW● Make it slower, I can’t grab a

coffee

xkcd.com

Page 33: Living with microservices at Pipedrive

Service developer wants to run

Services we require to run on the server

Page 34: Living with microservices at Pipedrive

Challenges to be resolved

● Multi-datacenter/regions● Autoscaling of containers● Rollbacks● Secrets management● Development environment

Page 35: Living with microservices at Pipedrive

Beware of the Gold Fever

“To make error is human. To propagate error to all server in automatic way is #devops.”

Page 36: Living with microservices at Pipedrive

Final Thoughts

● Define the problem you need to solve● The right answer > 1

Page 37: Living with microservices at Pipedrive

Final Thoughts

● Define the problem you need to solve.● The right answer > 1

Thank you!

Feedback is highly encouraged :)

@rreinurm