CPC G06F 16/2379 (2019.01) | 18 Claims |
1. A method comprising:
positioning an access service between a plurality of Kubernetes pods and a structured query language (SQL) database service, the plurality of Kubernetes pods hosting instances of microservices from a containerized application and positioned to receive requests from a load balancer that distributes the requests across the Kubernetes pods, and
the access service comprising a staging database, separate from the SQL database service, that temporarily holds SQL operations that are requested by different Kubernetes pods over different connections, but are to be atomically committed;
receiving, at the access service, a REpresentational State Transfer (REST) application programing interface (API) request from any Kubernetes pod indicating that a SQL transaction should be started;
creating an entry in the staging database to track the SQL transaction;
allowing multiple connections to be established from the plurality of Kubernetes pods to the access service over which other REST requests from any of the Kubernetes pods are sent, the other REST requests comprising details of SQL operations to be performed as part of the SQL transaction;
caching the details in the staging database;
receiving, at the access service, a REST request from any Kubernetes pod indicating that the SQL transaction should be committed; and
establishing a single connection from the access service to the SQL database service to commit the SQL transaction including the details as an atomic transaction via the single connection.
|