Testing Heimdall
Many customers who are in interested in testing Heimdall will following these steps:
- Install Heimdall;
- Use the wizard to configure access to their database;
- Use a tool such as DBeaver, PGAdmin, or other tool to generate traffic;
- Observe that despite caching and read/write split being enabled, neither work;
- 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:
- 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;
- Even if they don't use cursors, they generally apply "pagination" techniques that also break caching;
- 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.