Microservice Comparison

Stephen Solka
Aug 23, 2018 · 3 min read

Build a simple microservice in three languages to have a solid baseline to compare implementation time.


This is a very common pattern for microservices. Slightly bigger than a hello world and forces you to bump into some platform warts.


Crystal is a beautiful language. The standard library is rich and well thought out. Type inference mostly just works. The size of the community, age of the language and issues teams have hit trying scale up to larger systems will keep me away from recommending it for anything other than side projects.

I want to like Rust. This is my second time implementing something in rust. They have done a great job writing documentation around the language. Rust book is massive. My main issue with rust comes when you start to wade outside the standard library.

You have to chose your own destiny on concurrency primitives, http clients, servers, routers even byte buffers come from external crates. Hopefully you pick libraries that work together. Good luck if your team goes through an open source audit.

Detailed thoughts on implementations


Rust requires a larger investment in time to get moving. Larger being defined as a hour or two of reading about memory management for a senior engineer will get you started. Errors are normally helpful at suggesting next steps.

Batteries were not included. Have to go out and decide which async library / http server is right for your project. To do this basic workflow brought in 150+ transitive dependencies.

Many of the code examples out there are using use xxx::*; which makes it hard to understand where things are coming from. Avoid use* while you are learning.

Originally tried to go with hyper http client until I realized hyper’s http examples don’t support https. Decided to go with reqwest but the current version of reqwest’s docs are broken.


Implementation-wise was pretty straight forward. Deep generic JSON access was really ugly and involved a lot of type casting. Went with a defined JSON type to clean up the code.

Go has a standard http server but routing is third party. Went with echo because the documentation and error handling was helpful. Used std JSON support but its known to be slow. Consider picking a third party library if your payloads are large.

Implementation brought in 11 transitive dependencies.

Note: Reddit seems to be blacklisting go’s http agent. Consistent 429s until I changed it.


Youngest language. Smallest implementation. Code is very ruby like. I appreciate the JSON builder concept the standard library provides. Release build can spike in time to 5 seconds. Build time horror stories on reddit make me nervous about using it for anything serious.

Standard library wise similar situation to golang in that http server built in router is third party. Implementation brought in 4 transitive dependencies.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store