From 8bdf6971309dee8046896622f448652fd9c3f32c Mon Sep 17 00:00:00 2001 From: airblag Date: Fri, 27 Mar 2020 21:04:12 +0100 Subject: [PATCH] Updated Workers setup with nginx (markdown) --- Workers-setup-with-nginx.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Workers-setup-with-nginx.md b/Workers-setup-with-nginx.md index 3edf3a9..1554ac1 100644 --- a/Workers-setup-with-nginx.md +++ b/Workers-setup-with-nginx.md @@ -25,9 +25,12 @@ I expect you have already a working synapse configuration. Not putting whole con ## analysing old logs -First, I wanted to check what endpoints are asked the most in my installation. I grepped the endpoints of every worker as described in https://github.com/matrix-org/synapse/blob/master/docs/workers.md in my nginx access log for 24 hours: +First, I wanted to check what endpoints are asked the most in my installation. I grepped the endpoints of every worker as described in https://github.com/matrix-org/synapse/blob/master/docs/workers.md in my nginx access log for 24 hours. +Below the grep I used for different worker's endpoints + ### synapse.app.synchrotron -`grep -E '(/_matrix/client/(v2_alpha|r0)/sync|/_matrix/client/(api/v1|v2_alpha|r0)/events|/_matrix/client/(api/v1|r0)/initialSync|/_matrix/client/(api/v1|r0)/rooms/[^/]+/initialSync)' |wc -l` + +`grep -E '(/_matrix/client/(v2_alpha|r0)/sync|/_matrix/client/(api/v1|v2_alpha|r0)/events|/_matrix/client/(api/v1|r0)/initialSync|/_matrix/client/(api/v1|r0)/rooms/[^/]+/initialSync)'` ### synapse.app.federation_reader @@ -35,8 +38,7 @@ First, I wanted to check what endpoints are asked the most in my installation. I ### synapse.app.media_repository -`grep -E '(/_matrix/media/|/_synapse/admin/v1/purge_media_cache|/_synapse/admin/v1/room/.*/media.*|/_synapse/admin/v1/user/.*/media.*|/_synapse/admin/v1/media/.*|/_synapse/admin/v1/quarantine_media/.*)' -root@mort:/var/log/nginx# zgrep -E '(/_matrix/media/|/_synapse/admin/v1/purge_media_cache|/_synapse/admin/v1/room/.*/media.*|/_synapse/admin/v1/user/.*/media.*|/_synapse/admin/v1/media/.*|/_synapse/admin/v1/quarantine_media/.*)'` +`grep -E '(/_matrix/media/|/_synapse/admin/v1/purge_media_cache|/_synapse/admin/v1/room/.*/media.*|/_synapse/admin/v1/user/.*/media.*|/_synapse/admin/v1/media/.*|/_synapse/admin/v1/quarantine_media/.*)'` ### synapse.app.client_reader