forked from fediversity/fediversity
		
	Had to go in the workers.md file of course.
This commit is contained in:
		
							parent
							
								
									7c0a93f5ec
								
							
						
					
					
						commit
						f847f63f04
					
				
					 3 changed files with 138 additions and 66 deletions
				
			
		|  | @ -640,69 +640,3 @@ 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 | ||||
| ``` | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										64
									
								
								matrix/synapse/temp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								matrix/synapse/temp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,64 @@ | |||
| ## 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 | ||||
| ``` | ||||
| 
 | ||||
|  | @ -151,3 +151,77 @@ After=network.target | |||
| [Install] | ||||
| WantedBy=multi-user.target | ||||
| ``` | ||||
| 
 | ||||
| 
 | ||||
| # Create workers | ||||
| 
 | ||||
| We need a configuration file for each worker, and the main process needs to | ||||
| know which workers there are and how to contact them. | ||||
| 
 | ||||
| The latter is done in the ... | ||||
| 
 | ||||
| 
 | ||||
| ## 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