官术网_书友最值得收藏!

PostgreSQL application scaling lifecycle

While every application has unique growth aspects, there are many common techniques that you'll find necessary as an application using a PostgreSQL database becomes used more heavily. The chapters of this book each focus on one of the common aspects of this process. The general path that database servers follow includes:

  1. Select hardware to run the server on. Ideally, you'll test that hardware to make sure it performs as expected too.
  2. Set up all the parts of database disk layout: RAID level, filesystem, and possibly table/index layout on disk.
  3. Optimize the server configuration.
  4. Monitor server performance and how well queries are executing.
  5. Improve queries to execute more efficiently, or add indexes to help accelerate them.
  6. As it gets more difficult to just tune the server to do more work, instead reduce the amount it has to worry about by introducing connection pooling and caching.
  7. Replicate the data onto multiple servers and distribute reads among them.
  8. Partition larger tables into sections. Eventually, really large ones may need to be split so that they're written to multiple servers simultaneously.

This process is by no means linear. You can expect to make multiple passes over optimizing the server parameters. It may be the case that you decide to buy newer hardware first, rather than launching into replication or partitioning work that requires application redesign work. Some designs might integrate caching into the design from the very beginning. The important thing is to be aware of the various options available and to collect enough data about what limits the system is reaching to decide which of the potential changes is most likely to help.

主站蜘蛛池模板: 阜阳市| 黄骅市| 宁河县| 富源县| 砀山县| 洛宁县| 绿春县| 徐水县| 郸城县| 城口县| 麟游县| 大荔县| 青川县| 兴业县| 云安县| 扎囊县| 策勒县| 清原| 视频| 黔西| 罗甸县| 东安县| 泰顺县| 焉耆| 获嘉县| 黄浦区| 五常市| 吉木萨尔县| 鹤峰县| 连城县| 衡阳市| 新营市| 潼南县| 全南县| 沁水县| 和田市| 将乐县| 临江市| 平山县| 普安县| 保德县|