r/programming • • Nov 28 '15

Coding is boring, unless…

https://blog.enki.com/coding-is-boring-unless-4e496720d664
671 Upvotes

390 comments sorted by

View all comments

16

u/deadalnix Nov 29 '15

Stopped at microservice. If you can't build a monolithic codebase without creating a huge mess, microservice will just provide you an alternative way to hang yourself.

1

u/ascii Nov 29 '15

I've found that there are tremendous advantages to a microservice architecture. My employer has a codebase consisting of several hundred services.

  • Our back-end runs in six different data centers, but only the services with the highest number of requests or the highest latency requirements run everywhere, the vast majority of services are only running in two or four of those data centers, and the rest of the requests are sent cross-site. Data replication for cross-site writes to six datacenters would be completely unfeasible for some services, but since we have fine grained control over what services run where, that is a non-issue.

  • Some services contain privacy sensitive data and access to them are therefore restricted to only one team.

  • A small number of services unfortunately need to have in-memory state. Restarting those services is a costly operation since the state must be rebuilt. Other services are in heavy development and new versions are rolled out to production several times per day.

  • We have gradually transitioned our back-end from one language to another. This would have been almost completely impossible if it had been a monolith.

  • We can bring new developers up to speed in a few days. This would be much harder if we didn't have the clear separation of concerns given to us by stable versioned APIs.

  • We have tools that allow us to snoop, filter, record and replay traffic between services. This gives us a powerful set of tools to test out new versions, simulate higher traffic load and debug problems.

→ More replies (2)