This document helps you think about scaling Hyvor Relay. It might oversimplify certain aspects, but it should give you a good starting point.
Hyvor Relay heavily relies on Postgres connections. Email, webhook, and API workers all create Postgres connections. You need to ensure that your Postgres instance can handle the total number of connections created by all workers:
The default max connection limit is 100. As a first step, you can increase it based on available RAM on your Postgres server. A common recommendation is to allocate 1 connection per 10MB of RAM. For example, if your Postgres server has 32GB RAM, you can set max connections to 320. Note that this is a general recommendation, and you might also need to consider other system resources.
Here are some examples of scaling Hyvor Relay for different email sending volumes. We assume the following in all examples:
Sending 1 million emails per day is easily achievable with Hyvor Relay with just one app server and Postgres default settings. Here's a breakdown of the requirements:
Sending 10 million emails per day requires more resources. Here's a breakdown of the requirements: