Split exist app
In order to make the import more robust and performant, we want to utilize kubernetes scalability features.
stateDiagram-v2
[*] --> kubernetes
kubernetes --> exLeader
exLeader --> exWorker :import
exWorker --> exLeader :result
exLeader --> [*]
The final architecture will contain a replicaSet of existdb to be used for import tasks only, while one leader existdb is coordinating all requests and stores all import results to be returned on queries.
This requires the app to be split up into a main app (leader) and an import app for the worker. The database document triggers have to be rewritten. Ideally the import request is evaluated in an async way, maybe with util:eval-async
.