# 优化我的 DO Droplet 配置

**URL:** https://meta.discourse.org/t/improve-my-do-droplet-setup/141665
**Category:** Self-hosting
**Created:** [2020年二月15日 05:13 UTC](https://meta.discourse.org/t/improve-my-do-droplet-setup/141665 "2020-02-15T05:13:25Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![marianord](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marianord/32/90502_2.png) [@marianord](https://meta.discourse.org/u/marianord)
#### Post date: [2020年二月15日 14:19 UTC](https://meta.discourse.org/t/improve-my-do-droplet-setup/141665/6 "2020-02-15T14:19:45Z")

</div>

如果你（出于某种原因）希望在 DigitalOcean 上实现完全的高可用（HA）架构，我会建议采用以下方案：

- 负载均衡器
- 运行应用容器的 Droplets
- DigitalOcean 托管的 PostgreSQL 数据库

以下是关于外部数据库配置的一些信息：

> [@Configure Discourse to use a separate PostgreSQL server](https://meta.discourse.org/t/running-discourse-with-a-separate-postgresql-server/46375):
>
> Let’s say you’re using AWS RDS, or an existing PostgreSQL server managed elsewhere. It’s fairly straightforward to get Discourse to use such a setup, without needing to grant superuser privileges to anything that Discourse itself runs. Here’s how. Prerequisites Discourse requires PostgreSQL’s major version to [match what we ship with in our docker images](https://github.com/discourse/discourse_docker/blob/main/image/base/Dockerfile#L37); if you try to run on a newer or older version, it might work, but we don’t guarantee it, and if something breaks in the future, you get to …

不过，这将大幅增加基础设施的月度账单，我个人认为这完全没有必要。此外，这也无法防范大规模数据中心故障，因为 DigitalOcean 在各区域中并未提供多可用区（Multi-AZ）支持，也不支持跨区域负载均衡（至少据我了解是这样的）。

在我使用 DigitalOcean 的五年左右时间里，从未遇到过任何会如此严重影响数据中心的故障。

---

_[View the full topic](https://meta.discourse.org/t/improve-my-do-droplet-setup/141665)._
