Milliseconds Matter: Fast APIs Matter

Psst: we are hiring remote frontend developers and backend developers.

Illustration of a person holding a laptop and a person holding a picture of cat

Our friends at Snowball recently stated that fast websites drive sales. In order to succeed in building fast performing e-commerce websites you need to make sure your API backend does not slow you down. There are many factors that make out the total perceived and measured frontend performance of a website of course. We are making sure that it is not lagging in our API. Our APIs typically respond in around 5ms.

Millisecond Hunting for Fast API

As we strive to build a faster and easier to use API we like to go millisecond hunting. Because milliseconds does matter especially in the API driven economy we live in today. The reality is that milliseconds add up, and you should always strive to make your response time as low as possible.

Snowball did some testing of our APIs and loaded the repository up with one million products and did some simple benchmarking. The result was that the API consistently responded in 5.5 milliseconds. That is totally acceptable, but of course we still look for where we can shave an extra millisecond off.

Going green with AWS micro instances

A neat consequence of writing lean APIs is that you can run on smaller instances and still get the performance required to scale. We are using AWS in our product and try to launch as much as possible on micro instances. Getting speed, better user experience and of course using less computing power and energy. It also makes for great software architectures.

Removing latency with GraphQL

Another important aspect of building super fast e-commerce websites is to make sure you have as few calls to the back-end as possible. We solve this by using GraphQL as the main query language. This is a super easy to use query language for fetching structured hierarchical data. The result is typically one call to the back end API. This gives us less DNS lag, less transfer time and in the end just a pleasant API to work with.

Millisecond hunting should be part of any software development culture in our opinion.

Check out Crystallize our super fast GraphQL based PIM.