Skip to content

Commit 5a441a6

Browse files
committed
all room routes to room workers by room_id_hash
1 parent aabbf1d commit 5a441a6

6 files changed

Lines changed: 389 additions & 200 deletions

File tree

charts/synapse/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ apiVersion: v2
22
appVersion: 1.151.0
33
description: matrix synapse kubernetes deployment
44
name: synapse
5-
version: 2.5.1
5+
version: 2.5.2

charts/synapse/tests/golden/fixtures/test-envoy-configmap-msc4306.golden.yaml

Lines changed: 126 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,132 @@ data:
370370
envoy.filters.http.lua:
371371
"@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute
372372
name: room_hash
373+
- match:
374+
safe_regex:
375+
regex: '^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/joined_members'
376+
route:
377+
timeout: 300s
378+
auto_host_rewrite: true
379+
cluster: httpd-room-ring-hash
380+
hash_policy:
381+
- header:
382+
header_name: X-Hash-Key
383+
typed_per_filter_config:
384+
envoy.filters.http.lua:
385+
"@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute
386+
name: room_hash
387+
- match:
388+
safe_regex:
389+
regex: '^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/context/.*'
390+
route:
391+
timeout: 300s
392+
auto_host_rewrite: true
393+
cluster: httpd-room-ring-hash
394+
hash_policy:
395+
- header:
396+
header_name: X-Hash-Key
397+
typed_per_filter_config:
398+
envoy.filters.http.lua:
399+
"@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute
400+
name: room_hash
401+
- match:
402+
safe_regex:
403+
regex: '^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/members'
404+
route:
405+
timeout: 300s
406+
auto_host_rewrite: true
407+
cluster: httpd-room-ring-hash
408+
hash_policy:
409+
- header:
410+
header_name: X-Hash-Key
411+
typed_per_filter_config:
412+
envoy.filters.http.lua:
413+
"@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute
414+
name: room_hash
415+
- match:
416+
safe_regex:
417+
regex: '^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state'
418+
route:
419+
timeout: 300s
420+
auto_host_rewrite: true
421+
cluster: httpd-room-ring-hash
422+
hash_policy:
423+
- header:
424+
header_name: X-Hash-Key
425+
typed_per_filter_config:
426+
envoy.filters.http.lua:
427+
"@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute
428+
name: room_hash
429+
- match:
430+
safe_regex:
431+
regex: '^/_matrix/client/(v1|unstable)/rooms/.*/relations/.*'
432+
route:
433+
timeout: 300s
434+
auto_host_rewrite: true
435+
cluster: httpd-room-ring-hash
436+
hash_policy:
437+
- header:
438+
header_name: X-Hash-Key
439+
typed_per_filter_config:
440+
envoy.filters.http.lua:
441+
"@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute
442+
name: room_hash
443+
- match:
444+
safe_regex:
445+
regex: '^/_matrix/client/v1/rooms/.*/threads'
446+
route:
447+
timeout: 300s
448+
auto_host_rewrite: true
449+
cluster: httpd-room-ring-hash
450+
hash_policy:
451+
- header:
452+
header_name: X-Hash-Key
453+
typed_per_filter_config:
454+
envoy.filters.http.lua:
455+
"@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute
456+
name: room_hash
457+
- match:
458+
safe_regex:
459+
regex: '^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/event/.*'
460+
route:
461+
timeout: 300s
462+
auto_host_rewrite: true
463+
cluster: httpd-room-ring-hash
464+
hash_policy:
465+
- header:
466+
header_name: X-Hash-Key
467+
typed_per_filter_config:
468+
envoy.filters.http.lua:
469+
"@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute
470+
name: room_hash
471+
- match:
472+
safe_regex:
473+
regex: '^/_matrix/client/v1/rooms/.*/timestamp_to_event'
474+
route:
475+
timeout: 300s
476+
auto_host_rewrite: true
477+
cluster: httpd-room-ring-hash
478+
hash_policy:
479+
- header:
480+
header_name: X-Hash-Key
481+
typed_per_filter_config:
482+
envoy.filters.http.lua:
483+
"@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute
484+
name: room_hash
485+
- match:
486+
safe_regex:
487+
regex: '^/_matrix/client/(api/v1|r0|v3|unstable/.*)/rooms/.*/aliases.*'
488+
route:
489+
timeout: 300s
490+
auto_host_rewrite: true
491+
cluster: httpd-room-ring-hash
492+
hash_policy:
493+
- header:
494+
header_name: X-Hash-Key
495+
typed_per_filter_config:
496+
envoy.filters.http.lua:
497+
"@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.LuaPerRoute
498+
name: room_hash
373499
- match:
374500
safe_regex:
375501
regex: '^/_matrix/federation/v1/version'
@@ -744,55 +870,13 @@ data:
744870
timeout: 300s
745871
auto_host_rewrite: true
746872
cluster: httpd-client-reader
747-
- match:
748-
safe_regex:
749-
regex: '^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/joined_members'
750-
route:
751-
timeout: 300s
752-
auto_host_rewrite: true
753-
cluster: httpd-client-reader
754-
- match:
755-
safe_regex:
756-
regex: '^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/context/.*'
757-
route:
758-
timeout: 300s
759-
auto_host_rewrite: true
760-
cluster: httpd-client-reader
761-
- match:
762-
safe_regex:
763-
regex: '^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/members'
764-
route:
765-
timeout: 300s
766-
auto_host_rewrite: true
767-
cluster: httpd-client-reader
768-
- match:
769-
safe_regex:
770-
regex: '^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state'
771-
route:
772-
timeout: 300s
773-
auto_host_rewrite: true
774-
cluster: httpd-client-reader
775873
- match:
776874
safe_regex:
777875
regex: '^/_matrix/client/v1/rooms/.*/hierarchy'
778876
route:
779877
timeout: 300s
780878
auto_host_rewrite: true
781879
cluster: httpd-client-reader
782-
- match:
783-
safe_regex:
784-
regex: '^/_matrix/client/(v1|unstable)/rooms/.*/relations/.*'
785-
route:
786-
timeout: 300s
787-
auto_host_rewrite: true
788-
cluster: httpd-client-reader
789-
- match:
790-
safe_regex:
791-
regex: '^/_matrix/client/v1/rooms/.*/threads'
792-
route:
793-
timeout: 300s
794-
auto_host_rewrite: true
795-
cluster: httpd-client-reader
796880
- match:
797881
safe_regex:
798882
regex: '^/_matrix/client/unstable/im\.nheko\.summary/summary/.*'
@@ -856,34 +940,13 @@ data:
856940
timeout: 300s
857941
auto_host_rewrite: true
858942
cluster: httpd-client-reader
859-
- match:
860-
safe_regex:
861-
regex: '^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/event/.*'
862-
route:
863-
timeout: 300s
864-
auto_host_rewrite: true
865-
cluster: httpd-client-reader
866943
- match:
867944
safe_regex:
868945
regex: '^/_matrix/client/(api/v1|r0|v3|unstable)/joined_rooms'
869946
route:
870947
timeout: 300s
871948
auto_host_rewrite: true
872949
cluster: httpd-client-reader
873-
- match:
874-
safe_regex:
875-
regex: '^/_matrix/client/v1/rooms/.*/timestamp_to_event'
876-
route:
877-
timeout: 300s
878-
auto_host_rewrite: true
879-
cluster: httpd-client-reader
880-
- match:
881-
safe_regex:
882-
regex: '^/_matrix/client/(api/v1|r0|v3|unstable/.*)/rooms/.*/aliases.*'
883-
route:
884-
timeout: 300s
885-
auto_host_rewrite: true
886-
cluster: httpd-client-reader
887950
- match:
888951
safe_regex:
889952
regex: '^/_matrix/client/(api/v1|r0|v3|unstable)/search'

0 commit comments

Comments
 (0)