dispatch main requests to main server
This commit is contained in:
parent
bde6eb5642
commit
0a2f602ff3
3 changed files with 16 additions and 26 deletions
|
@ -1,14 +0,0 @@
|
|||
worker_app: synapse.app.generic_worker
|
||||
worker_name: synapse-generic-worker-sync
|
||||
|
||||
worker_listeners:
|
||||
- type: http
|
||||
port: 8083
|
||||
resources:
|
||||
- names: [client]
|
||||
- type: http
|
||||
port: 9083
|
||||
resources:
|
||||
- names: [replication]
|
||||
|
||||
worker_log_config: /data/generic-worker-log.yaml
|
|
@ -2,9 +2,10 @@ worker_app: synapse.app.generic_worker
|
|||
worker_name: synapse-worker-generic
|
||||
|
||||
worker_listeners:
|
||||
- type: http
|
||||
port: 8008
|
||||
- port: 8008
|
||||
type: http
|
||||
tls: false
|
||||
x_forwarded: true
|
||||
resources:
|
||||
- names:
|
||||
- client
|
||||
- federation
|
||||
- names: [client, federation]
|
||||
compress: false
|
||||
|
|
|
@ -36,17 +36,20 @@ server {
|
|||
|
||||
}
|
||||
|
||||
# All other matrix/synapse requests
|
||||
# Client requests
|
||||
location ~ ^/_matrix/client/(api/v1|r0|unstable)/publicRooms$|^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/joined_members$|^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/context/.*$|^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/members$|^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/state$|^/_matrix/client/(api/v1|r0|unstable)/account/3pid$|^/_matrix/client/(api/v1|r0|unstable)/devices$|^/_matrix/client/(api/v1|r0|unstable)/keys/query$|^/_matrix/client/(api/v1|r0|unstable)/keys/changes$|^/_matrix/client/versions$|^/_matrix/client/(api/v1|r0|unstable)/voip/turnServer$|^/_matrix/client/(api/v1|r0|unstable)/joined_groups$|^/_matrix/client/(api/v1|r0|unstable)/publicised_groups$|^/_matrix/client/(api/v1|r0|unstable)/publicised_groups/|^/_matrix/client/(api/v1|r0|unstable)/rooms/.*/event/|^/_matrix/client/(api/v1|r0|unstable)/joined_rooms$|^/_matrix/client/(api/v1|r0|unstable)/search$ {
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_pass http://synapse-worker-generic:8008;
|
||||
}
|
||||
|
||||
# All other matrix/synapse requests go to main
|
||||
location ~ /_matrix|/_synapse {
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Host $http_host;
|
||||
|
||||
proxy_connect_timeout 600s;
|
||||
proxy_send_timeout 600s;
|
||||
proxy_read_timeout 600s;
|
||||
send_timeout 600s;
|
||||
|
||||
proxy_pass http://synapse-worker-generic:8008;
|
||||
proxy_pass http://synapse-main:8008;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue