SaFi Bank Space : SQL engine choice

Status

COMPLETE

Impact

HIGH

Driver

Juraj Macháč (Unlicensed)

Approver

Ion Mudreac

Contributors

Jan Görig (Unlicensed) Slavomír Kocka (Unlicensed) Peter Luknár (Unlicensed)

Informed

Due date

Resources

(blue star) Relevant data

(blue star) Background

In the DB choice decision log we agreed on using an alternative for SQL and an alternative for NoSQL engine which the microservices can connect to.

This decision log is about choosing the proper SQL engine. The natural choice would be Postgresql, but we are also considering using Spanner which seems to have better DR options.

(blue star) Options considered

Cloud Spanner

Postgresql

Description

https://cloud.google.com/spanner

https://www.postgresql.org/

Pros and cons

(plus) Cloud native

(plus) better scalability and replication (active / passive cross region replica)

(minus) GCP only

(minus) local development using emulator only

(minus) some paradigm changes (e.g. indices)

(minus) Not supported by TM, and with high probability also not supported by many other 3rd parties to be deployed on premise.

(plus) vendor independent

(plus) HA achieved using multiple zones in one region with available read replica in different region

(plus) local development possible

(plus) traditional database approach

(minus) Does not support active/passive multi-region replication

Estimated cost

(blue star) Action items

(blue star) Outcome

The chosen DB engine was Postgresql mostly due to the fact that TM doesn’t support running on Spanner, which means that the DR procedures would need to be properly resolved for Postgresql anyways. Hence, no additional benefit for Spanner.