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

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.

主站蜘蛛池模板: 宝坻区| 铜鼓县| 射洪县| 敖汉旗| 泸州市| 淮南市| 凉城县| 克拉玛依市| 汉阴县| 南通市| 江北区| 宁河县| 梁山县| 洛南县| 象山县| 万源市| 修武县| 康马县| 呼伦贝尔市| 涞水县| 绵竹市| 织金县| 北京市| 抚顺市| 云和县| 汤阴县| 平潭县| 虞城县| 台山市| 和平县| 肇庆市| 陆良县| 祥云县| 防城港市| 昌吉市| 重庆市| 蚌埠市| 花莲县| 连云港市| 环江| 仪陇县|