forked from fediversity/fediversity
		
	Documenting individual workers.
This commit is contained in:
		
							parent
							
								
									cca8bcaa2b
								
							
						
					
					
						commit
						7c0a93f5ec
					
				
					 1 changed files with 66 additions and 0 deletions
				
			
		|  | @ -640,3 +640,69 @@ new policy. | |||
| 
 | ||||
| The options `server_notice_content` and `block_events_error` do not seem to be | ||||
| used, this is something that needs to be investigated. | ||||
| 
 | ||||
| 
 | ||||
| ## Temporary block | ||||
| 
 | ||||
| We're going to configure a few different workers: | ||||
| 
 | ||||
| * client-sync | ||||
| * roomworker | ||||
| * federation-sender | ||||
| * mediaworker | ||||
| 
 | ||||
| 
 | ||||
| ### Client-sync | ||||
| 
 | ||||
| This type needs both an inbound socket to receive stuff from nginx, and a | ||||
| replication socket to communicate with the rest. We probably want a few of | ||||
| these workers. The configuration should look like this: | ||||
| 
 | ||||
| ``` | ||||
| worker_app: "synapse.app.generic_worker" # Always this unless | ||||
| "synapse.app.media_repository" | ||||
| worker_name: "clientsync1" # Name of worker specified in instance map | ||||
| worker_log_config: "/data/log.config/client_sync.log.config" # Log config file | ||||
| 
 | ||||
| worker_listeners: | ||||
|   # Include for any worker in the instance map above: | ||||
|   - path: "/run/matrix-synapse/replication_clientsync1.sock" | ||||
|     type: http | ||||
|     resources: | ||||
|       - names: [replication] | ||||
|         compress: false | ||||
|   # Include for any worker that receives requests in Nginx: | ||||
|   - path: "/run/matrix-synapse/synapse_inbound_client_sync1.sock" | ||||
|     type: http | ||||
|     x_forwarded: true # Trust the X-Forwarded-For header from Nginx | ||||
|     resources: | ||||
|       - names: | ||||
|         - client | ||||
|         - consent | ||||
| ``` | ||||
| 
 | ||||
| ### Roomworker | ||||
| 
 | ||||
| These don't need a replication socket as they're not in the instance map, but | ||||
| they do need an inboud socket for nginx to pass stuff to them. We want a few | ||||
| of these workers, we may even configure a worker for one specific busy room... | ||||
| 
 | ||||
| Configuration should look like this: | ||||
| 
 | ||||
| ``` | ||||
| worker_app: "synapse.app.generic_worker" | ||||
| worker_name: "roomworker1" | ||||
| worker_log_config: "/data/log.config/rooms.log.config" | ||||
| 
 | ||||
| worker_listeners: | ||||
|   - path: "/run/matrix-synapse/inbound_roomworker1.sock" | ||||
|     type: http | ||||
|     x_forwarded: true | ||||
|     resources: | ||||
|       - names: | ||||
|         - client | ||||
|         - consent | ||||
|         - federation | ||||
|         compress: false | ||||
| ``` | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Hans van Zijst
						Hans van Zijst