Application Level Stop

I am developing a multi-user system and am considering what the tenant imposes at the application level instead of the database.

Hypothetically, how this should work is that for an incoming request, the router process has a global collection of tenants containing primary attributes to determine the tenant for this request, as well as the identifier of the virtual shard. This virtual shard identifier is then mapped to the actual shard.

The actual fragment contains both the code for the application and the whole data for this tenant. These fragments will be LNMP servers (Linux, Nginx, MySQL / MongoDB, PHP).

The router process must act as a proxy. It should be able to run some code to determine the target shard for the incoming request based on the collection stored in some local db or files. In order to be able to scale this better, I am considering the possibility that the fragments themselves act as routers, so that they can start a reverse proxy server that will redirect the request to the corresponding fragment. Perhaps a nginx instance running on a shard might also act as this reverse proxy. But how will he execute the application logic necessary to match the request with the corresponding fragment.

I will be grateful for any ideas and suggestions for implementing this router.

thank

+5
2

- , dbShards. dbShards - , . , RDMS (Postgres, MySQL ..) - , . , , dbShards , , "" - .

. dbshards

+1

, , .

, :

1 SaaS, . , resharding , SQL , .

MongoDB ( , Cassandra), - resharding/rebalancing .

MySQL, MongoDB ( ), . MongoDB .

0

All Articles