Manage Connection Pooling in multi-tenant web app with Spring, Hibernate and C3P0

后端 未结 2 1667
孤街浪徒
孤街浪徒 2020-12-04 08:19

I\'m trying to setup a multi-tenant web application, with (ideally) possibility for both Database-separated and Schema-separated approach at the same time. Although I\'m goi

2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-04 08:26

    IMHO, the connection pool management will be default handled by the Sql Server itself, however some programming languages like C# do offer some ways to control the pools. Refer here

    The choice of (1) schema or (2) separate database for a tenant depends upon the volume of the data that you can anticipate for the tenant. However, the following consideration can be worth looking into

    1. create a shared schema model for the trial customers and the low volume customers, this can be identified by the number of the features that you provide to a tenant during the process of onboarding a customer

    2. when you create or onboard a enterprise level customer that may have a large transactional data, it is ideal to go for a separate database.

    3. The schema model may have a different implementation for SQL Server and a different one for the MySQL Server, which you should consider.

    4. also when choosing for the option, do consider the fact that a customer [tenant] may be willing to scale out after a considerable amount of time and system usage. If there is no appropriate scale out option supported in your app, you will have to be bothered.

    Share your comments on the above points, to take this discussion further

提交回复
热议问题