Hello i have the following problem:
I have .NET Core WebApi
and a Distributed Database
(RethinkDB) that i want to scale using Docker
containers.
The database can be both sharded and replicated ( i am not interested in replication though).
My problem lies in the design:
Using docker i have already created
1. Dockerfile
for database
2. Dockerfile
for webapi
3. Dockercompose
for the pair.
My question is how do you integrate Docker-swarm
or Kubernetes
for scaling in this situation ? I am not very familiar but the web-api
is dependant on the database to work.Do i need docker compose in this situation ? Or how do they all fit together ? (Dockerizing dependent components + scaling ).
Do you dockerize all components in one and then scale it , or you separate them and scale each separately?