backends configuration:
┌──────────────┬────────────────┬────────┬───┬───┬──────┐
│ backend id │ IP address │ Backup │ 0 │ 1 │ main │
├──────────────┼────────────────┼────────┼───┼───┼──────┤
│ a_backend_1 │ 127.0.0.1:1051 │ │ X │ X │ X │
├──────────────┼────────────────┼────────┼───┼───┼──────┤
│ aa_backend_4 │ 127.0.0.1:1054 │ │ X │ X │ X │
├──────────────┼────────────────┼────────┼───┼───┼──────┤
│ b_backend_3 │ 127.0.0.1:1053 │ │ X │ X │ X │
├──────────────┼────────────────┼────────┼───┼───┼──────┤
│ c_backend_2 │ 127.0.0.1:1052 │ │ X │ X │ X │
└──────────────┴────────────────┴────────┴───┴───┴──────┘
In the same way, the frontends of a cluster will be sorted by hostname:
┌───────────┬─────────────────┬───────────────┬───┬───┬──────┐
│ id │ hostname │ path │ 0 │ 1 │ main │
├───────────┼─────────────────┼───────────────┼───┼───┼──────┤
│ MyCluster │ abracadabra.com │ prefix '/api' │ X │ X │ X │
├───────────┼─────────────────┼───────────────┼───┼───┼──────┤
│ MyCluster │ blabla.com │ prefix '/api' │ X │ X │ X │
├───────────┼─────────────────┼───────────────┼───┼───┼──────┤
│ MyCluster │ localhost │ prefix '/api' │ X │ X │ X │
└───────────┴─────────────────┴───────────────┴───┴───┴──────┘
Using BTreeMaps instead of HashMaps suffices to sort items alphabetically. For instance, this list of backends in a
config.toml
for a given cluster:will be displayed like this:
In the same way, the frontends of a cluster will be sorted by hostname: