Skip to content

Commit

Permalink
docs: recommend to start with one container in prod to complete first…
Browse files Browse the repository at this point in the history
…-time setup. (#2945)

This is to ensure multiple concurrent workers don't both generate JWKs needlessly, for example.

See #2943 (reply in thread)
  • Loading branch information
mig5 authored Jan 21, 2022
1 parent b177672 commit e257f3e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/docs/production.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,19 @@ serve:
group: hydra-admin-api
mode: 770
```

### Key generation and High Availability environments

Be aware that on the very first launch of the Hydra container(s), a worker
process will perform certain first-time installation tasks, such as generating
[JSON web keys](/hydra/docs/jwks) if they don't already exist.

If you intend on running your production Hydra environment in a highly-available
setup (for example, multiple concurrent containers behind a load-balancer), it's
possible that both containers will generate JWKs at the same time.

Although this isn't a problem, we recommend that you launch your production
environment with just one container to begin with, to complete the initial
seeding of the database.

Once done, you can raise your number of containers to achieve high availability.

0 comments on commit e257f3e

Please sign in to comment.