Systems | Development | Analytics | API | Testing

June 2022

Compare REST and GraphQL Using k6 For Performance Testing

For many companies, performance is the main reason to go with GraphQL. But is that a valid argument? Often developers compare GraphQL to REST APIs and see the N+1 requests (or over-fetching) as an important reason to go for GraphQL. Let's put that to the test and explore if GraphQL APIs actually can outperform existing REST APIs. For this, we'll take a GraphQL-ized REST API (from JSONPlaceholder) and test the performance of GraphQL and compare it to the REST approach.

A quick guide to load testing Grafana Loki with Grafana k6

As a software engineer here at Grafana Labs, I’ve learned there are two questions that commonly come up when someone begins setting up a new Loki installation: “How many logs can I ingest into my cluster?” followed by, “How fast can I query these logs?” There are two ways to find out the answers.

Rendezvous with k6

Rendezvous is a French word commonly used in the load testing word. It sounds so fancy! I believe Mercury first coined and implemented it (I may be wrong) in LoadRunner. NeoLoad has it with the same name, and JMeter calls it Synchronizing timer. But what is it really, and how may we use it? Rendezvous is a function that stops the virtual users when they reach that instruction in the script. The function makes them wait until more virtual users get to that step or a timer runs out.

Plugging-in Kubernetes

Kubernetes has been becoming the standard operating environment for applications over the past several years. With the xk6-kubernetes extension, you can add direct support for Kubernetes objects (ConfigMaps, Deployments, Jobs, et al) directly within your test scripts. Imagine, your test scripts could now directly setup your test environment by pre-scaling your services, change configuration, or even inject a little chaos _during_ your tests by deleting running pods to observe how your overall system behaves.