HomePhabricator
Diffusion Comm 4163b6376fd6

[keyserver] configure separation of primary secondary logic

Description

[keyserver] configure separation of primary secondary logic

Summary:
This introduces COMM_NODE_ROLE which specifies whether a node is a primary or secondary node.

Certain logic in keyserver/src/keyserver.js should only be performed by a primary node. This includes:

  • run the migration
  • establish tunnelbroker connection
  • print the QR Code
  • create authoritative keyserver config files

Both secondary and primary nodes should still perform:

  • have the master process create fork processes
  • route express traffic
  • verify the user is logged in

Depends on D12691

Test Plan:
Confirmed through logs that secondary nodes didn't establish tunnelbroker connection.
Will test further if migration is primary only later in stack with migration script

Reviewers: ashoat, varun

Reviewed By: ashoat

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D12708

Details

Provenance
willAuthored on Jul 8 2024, 11:51 AM
Reviewer
ashoat
Differential Revision
D12708: [keyserver] configure separation of primary secondary logic
Parents
rCOMM5810061a8009: [terraform] include REDIS_URL as part of keyserver terraform config
Branches
Unknown
Tags
Unknown