Microservices – Please, don’t
Oh microservices.  Here we go again.<p>Yes, it&#x27;s easy to get burned.  Yes, it&#x27;s often the absolute wrong tool for the job as a young startup.  Further, its all too easy to just light cash on fire once you get some real serious traffic hitting all these things that may autoscale individually.  We have seen it all before, and we will see it again.<p>But don&#x27;t throw the baby out with the bath water.  In fact, I think the healthiest approach is to drop the &quot;micro&quot; and think of classic Service Oriented Architecture (SOA).<p>When you hire your 50th engineer, and you don&#x27;t have this yet, its not the end of the world, but slowly moving from a monolith to a SOA, is pretty much a very well travelled path, and at a certain scale is how you maintain sanity.<p>It&#x27;s like the old saying, the first code you write is never the best.  Try the 2nd or 3rd rewrite, and you finally know what you want.  So start with a monolith, but don&#x27;t back yourself into a corner, and move one obvious service out at time.<p>The main benefits are not even what the article gripes about.  It is compartmentalization between teams, and honoring stable internal functionality between teams that it makes the biggest difference.  Sure scaling CAN be easier, but it can also be harder.  Things like managing connection pooling becomes easier with an SOA.  But not to the tune of doing it concurrently across 40 services, that is irresponsible to design without knowing exactly how they are all going to get hit when you finally get insane traffic.<p>One thing the author said that I agree should be more obvious to people is that somewhere in-between hiring engineer 12 and 50, you will end up running your monolith a bit like an SOA, where even if its the same codebase, you can run in different clusters&#x2F;pools and service a specific part of the application.  This is a wonderful way to get the benefits of SOA, with out the nightmare, furthermore, you will quickly learn which of the parts of code, when your rewriting it the 2nd time, you actually want to divorce from the monolith, and you already have patterns, load balancers, and metrics for what that code should do.<p>When you hire your 200th engineer, it&#x27;s easy to get on HN and say SOA is the only way to get the job done.  But people need to realize the importance of the journey of getting there.  Otherwise your just taking a shotgun to the skateboard your cruising down the road with.<p>Sanity is the key takeaway.  Always optimize for sanity.