Ask HN: Have you shipped anything serious with a “serverless” architecture?
So, you&#x27;ve kinda mixed a few things here including: &quot;Cloud functions&quot;, &quot;Cloud Streams&quot; and &quot;Cloud databases&quot; [1].<p>I&#x27;ve shipped significant work on all 3 now, with the least focus on the newest bit (cloud functions). Since you asked, here are my opinions:<p># Cloud Databases<p>These are almost always a slam dunk unless you or someone else on your team has a deep understanding of MySQL or Postgres [2]. They often have unique interfaces with different constraints, but you can work around these constraints and the freedom to scale these products quickly and not worry as much about maintenance can be an enormous boon for a small team. This is fundamentally different from something like AWS RDS, where you do in fact sort of &quot;have a server&quot; and &quot;configure that server&quot;. These other services have distribution build into their protocol.<p>Of the modern selection, DynamoDB and Firebase come to mind as particularly useful and spectacular products for key value and graph stores (DynamoDB is surprisingly good at it!). If you&#x27;re using GCE, Spanner is some kind of powerful sorceros storm that does your bidding if you pay Google, it&#x27;s really surreal the problems it can just magically solve (it&#x27;s the sort of thing where it&#x27;s so good your success with it disappears until you have to replicate it elsewhere and realize how much your code relied on it).<p># Cloud Streams<p>I&#x27;ve been using these nonstop for about 6 years now, with most time logged on SQS. For some reason a lot of people object to streaming architecture on grounds of backpressure [3], or &quot;want to run their own because of performance&quot; and end up hooking zookeeper and Kafka into their infrastructure.<p>For small products or growing products, You Will Almost Certainly Not Overload SQS or Kinesis. You Just Won&#x27;t Unless You&#x27;re Twitter or Segment. Write your system such that you can swap streaming backends, and be prepared to solve obnoxious replay problems moving to a faster and less helpful queue.<p>Lots of folks are convinced they need to run their own RabbitMQ service so that they &quot;can see what&#x27;s going on.&quot; Given how incredibly reliable SQS has been for me since its introduction, I&#x27;m disinclined to believe that. While RabbitMQ is a fine product, I&#x27;d rather just huck stuff on SQS, obey sound design principles, and then only transition to faster queues ones.<p># Cloud Functions (Cλ)<p>Firstly, these solutions work fine. I&#x27;ve only shipped on Lambda, and I will say I was underwhelmed. There are two reasons for this: cost and options. Cloud Functions with API Gateway is just about the most expensive way you can serve an API in the world of CSPs right now. The hidden requests costs are (or were when I set this up, shipped then tore it down looking in horror at my spend) just stupid. As for Options, it&#x27;s very obnoxious how these environments (GAE, Lambda, etc) can only bless specific environments rather than giving us a specification over I&#x2F;O or shm we could bind to. I want to ship Haskell in some cases and it&#x27;s stupid what I have to do to enable that [4].<p>Much has been said about how spaghetti-like these solutions are, but I think this is more of a tooling issue. If you can actually specify Cλ endpoints in a single file, then you can write a uni-repo for a family of endpoints that share common libraries, build for those, and terraform&#x2F;script them into deployment. This is actually probably <i>more</i> principled than how most folks cram endpoints into a single fat binary. It also makes things like partial rollouts on an API a heck of a lot more easy to implement.<p>But still, out of the trinity of CSP products, Cλ is by far the least exciting to me. I seldom ship API endpoints there. I usually use it for small cron jobs or data collection jobs where I&#x27;m confident I wont&#x27; end up with 4 running instances because a looped call is timing out.<p>[0]: I&#x27;m experimenting with writing these mega posts with classical footnotes as opposed to making them epic journeys to slog through my prose style.<p>[1]: I hate myself more every time I say the word cloud even knowing it&#x27;s the lingo folks will understand the most. They&#x27;re service products. Let&#x27;s all sink into despair together.<p>[2]: And by &quot;deep&quot; I mean, &quot;Good enough to have a reputation suitable for a professional consultant and attract desperate clients.&quot;<p>[3]: To which I say, &quot;Look, if you wanna pretend that the only possible architecture is a spiderweb of microservices that positively push backpressure up to the client and pretend that introspect-able queues don&#x27;t give your services equivalent confirmation, that&#x27;s a game you can play. I think it&#x27;s disrespectful to folks who have equivalent backpressure schemes because they have similarly refined infrastructure for understanding their queue volume. Both methods are similar, and have different strengths. Needham&#x27;s duality is real and it&#x27;s exactly the same here as it is on one single computer.&quot;<p>[4]: It&#x27;s 2018, we have containers, and if you support Java with its slower startup times you surely could support lightning fast Rust or Haskell executables as well. Get with it, Amazon!