CloudNeutral

Distributed Systems · Databases · Software Architecture

Photo by Growtika on Unsplash

Battery: A Workload-Driven Database Load Testing Tool

Standardized benchmarks such as TPC-C, YCSB and sysbench are useful for comparing database systems under defined workloads. But those workloads rarely match an application’s specific transaction patterns, data access paths, contention characteristics or concurrency model. Reproducing those interactions under load provides a different perspective: how the database behaves under traffic shaped like your application. Battery is an open-source load-testing tool built for that purpose. You describe the workload using YAML, SQL and a small scripting language, then run it with potentially thousands of concurrent virtual users (VUs), optionally distributed across multiple hosts. ...

October 10, 2026 · 10 min · Kai Niemi

Designing Idempotent REST APIs: Stateless Preconditions and Idempotency Keys

How do you safely retry a POST request when the outcome is unknown? A comparison of stateless preconditions and idempotency keys, using funds transfers as an example.

October 19, 2022 · 15 min · Kai Niemi

Shortest Path Algorithms: Dijkstra, A* and Pathfinding in Games

Originally published in April 2022. Updated October 2026. Finding the best route between two points sounds simple until the map contains hundreds of intersections, roads with different travel costs, and areas that should be avoided altogether. This is the shortest-path problem: given a graph and a cost for traversing each edge, find a path whose total cost is minimal. In this article, we’ll use a small graph to explore two classic shortest-path algorithms: Dijkstra’s algorithm and A search*. We’ll start with the fundamentals of graph theory and briefly explore breadth-first search (BFS), depth-first search (DFS), and Bellman–Ford before examining Dijkstra and A* step by step. ...

April 28, 2022 · 16 min · Kai Niemi