Add cluster replication configuration and enhance event handling
- Introduced support for cluster replication in the ORLY system, allowing for distributed relay clusters with active replication.
- Updated the configuration to include a new option for propagating privileged events to relay peers.
- Enhanced the `ClusterManager` to manage event propagation based on the new configuration setting.
- Improved the handling of event fetching to respect the propagation settings, ensuring better privacy for privileged events.
- Updated documentation to reflect the new cluster replication features and privacy considerations.
- Bumped version to v0.24.3 to reflect these changes.
@ -73,6 +73,9 @@ type C struct {
@@ -73,6 +73,9 @@ type C struct {
// TLS configuration
TLSDomains[]string`env:"ORLY_TLS_DOMAINS" usage:"comma-separated list of domains to respond to for TLS"`
Certs[]string`env:"ORLY_CERTS" usage:"comma-separated list of paths to certificate root names (e.g., /path/to/cert will load /path/to/cert.pem and /path/to/cert.key)"`
// Cluster replication configuration
ClusterPropagatePrivilegedEventsbool`env:"ORLY_CLUSTER_PROPAGATE_PRIVILEGED_EVENTS" default:"true" usage:"propagate privileged events (DMs, gift wraps, etc.) to relay peers for replication"`
}
// New creates and initializes a new configuration object for the relay
@ -39,14 +39,12 @@ Cluster administrators publish this replaceable event to define the current set
@@ -39,14 +39,12 @@ Cluster administrators publish this replaceable event to define the current set
@ -59,12 +57,11 @@ Cluster administrators publish this replaceable event to define the current set
@@ -59,12 +57,11 @@ Cluster administrators publish this replaceable event to define the current set
**Tags:**
- `d`: Identifier for the membership list (always "membership")
- `relay`: HTTP and WebSocket URLs of cluster member relays (comma-separated)
- `admin`: npub of cluster administrator (can have multiple)
**Authorization:** Only events signed by cluster administrators (listed in `admin` tags) are valid for membership updates.
**Authorization:** Only events signed by cluster administrators are valid for membership updates. Cluster administrators are designated through static relay configuration and cannot be modified by membership events.
### HTTP API Endpoints
@ -262,13 +259,11 @@ A reference implementation SHOULD include:
@@ -262,13 +259,11 @@ A reference implementation SHOULD include:
The system grants write access to users followed by designated admins, with read-only access for others. Follow lists update dynamically as admins modify their relationships.
=== cluster replication
ORLY supports distributed relay clusters using active replication. When configured with peer relays, ORLY will automatically synchronize events between cluster members using efficient HTTP polling.
**Privacy Considerations:** By default, ORLY propagates all events including privileged events (DMs, gift wraps, etc.) to cluster peers for complete synchronization. This ensures no data loss but may expose private communications to other relay operators in your cluster.
To enhance privacy, you can disable propagation of privileged events:
**Important:** When disabled, privileged events will not be replicated to peer relays. This provides better privacy but means these events will only be available on the originating relay. Users should be aware that accessing their privileged events may require connecting directly to the relay where they were originally published.