Connection Pool Strategy: Good, Bad or Ugly?

后端 未结 6 2112
甜味超标
甜味超标 2021-01-31 18:10

I\'m in charge of developing and maintaining a group of Web Applications that are centered around similar data. The architecture I decided on at the time was that each applicati

6条回答
  •  自闭症患者
    2021-01-31 18:35

    Your original design is based on sound principles. If it helps your case, this strategy is known as horizontal partitioning or sharding. It provides:

    1) Greater scalability - because each shard can live on separate hardware if need be.

    2) Greater availability - because the failure of a single shard doesn't impact the other shards

    3) Greater performance - because the tables being searched have fewer rows and therefore smaller indexes which yields faster searches.

    Your colleague's suggestion moves you to a single point of failure setup.

    As for your question about 3 connection pools of size 10 vs 1 connection pool of size 30, the best way to settle that debate is with a benchmark. Configure your app each way, then do some stress testing with ab (Apache Benchmark) and see which way performs better. I suspect there won't be a significant difference but do the benchmark to prove it.

提交回复
热议问题