How can I implement application partion architecture in k8s ?

1/28/2022

For example ,we want to manage ten million network or iot devices, so the bottleneck is the database. So we want to implement application partion architecture. So my question are

1 Can I deploy multiple pods with the same combination of docker image?( one db image, one devicemgr app imagine)

2 How to implement the router in this solution, so the client could route to different partition(devicemgr app) . Is there an existing architecture ?

-- Winsom
kubernetes
partition
router
scale

1 Answer

1/28/2022

Can I deploy multiple pods with the same combination of docker imagine?

Of course. You can run the same image as often as you have resources.

How to implement the router in this solution, Is there an existing architecture ?

Please search for "your-favorite-db an k8s operator".

For PostgreSQL you could use

But K8s does not give you a master-master replication setup magically!

For most traditional databases the K8s operator lets you run the DB in K8s. But at it is finally a single master with N replicas.

You need to have a look at the docs of the DB you want to use.

For PG: https://www.postgresql.org/docs/current/high-availability.html

If you want ten-millions, then I think Vitess could fit, if you want a relational DB. It is build for master-master replication.

But for "normal" scale I would recommend PG.

-- guettli
Source: StackOverflow