Testing Heimdall

Many customers who are in interested in testing Heimdall will following these steps:

  1. Install Heimdall;
  2. Use the wizard to configure access to their database;
  3. Use a tool such as DBeaver, PGAdmin, or other tool to generate traffic;
  4. Observe that despite caching and read/write split being enabled, neither work;
  5. Assume Heimdall doesn't work, delete and move on.

The critical flaw here is #3--using tool designed for easy user access to the database to try to test these features. They will not work (in general), for a variety of reasons:

  1. Often, they will use mechanisms such as cursors to execute a query, and a cursor is inherently allowed to modify the result on the database. As such, this breaks caching and read/write split;
  2. Even if they don't use cursors, they generally apply "pagination" techniques that also break caching;
  3. They may use prepared queries, which can break other features as well, such as query multiplexing.

The issues also apply to some benchmark tools, such as PGBench, which is designed specifically for cache busting and leverages cursors as well.

The best way to test Heimdall is with your actual application, not with database user access tools.