rocsp/config: fix PoolSize comment (#6110)
The go-redis docs say default is 10 * NumCPU, but the actual code says 5. Extra context:2465baaab5/options.go (L143-L145)2465baaab5/cluster.go (L96-L98)For Options, the default (documented) is 10 * NumCPUs. For ClusterOptions, the default (undocumented) is 5 * NumCPUs. We use ClusterOptions. Also worth noting: for ClusterOptions, the limit is per node.
This commit is contained in:
		
							parent
							
								
									25e4b7e7fa
								
							
						
					
					
						commit
						a4ba9b1adb
					
				| 
						 | 
				
			
			@ -53,7 +53,10 @@ type RedisConfig struct {
 | 
			
		|||
	WriteTimeout cmd.ConfigDuration
 | 
			
		||||
 | 
			
		||||
	// Maximum number of socket connections.
 | 
			
		||||
	// Default is 10 connections per every CPU as reported by runtime.NumCPU.
 | 
			
		||||
	// Default is 5 connections per every CPU as reported by runtime.NumCPU.
 | 
			
		||||
	// If this is set to an explicit value, that's not multiplied by NumCPU.
 | 
			
		||||
	// PoolSize applies per cluster node and not for the whole cluster.
 | 
			
		||||
	// https://pkg.go.dev/github.com/go-redis/redis#ClusterOptions
 | 
			
		||||
	PoolSize int
 | 
			
		||||
	// Minimum number of idle connections which is useful when establishing
 | 
			
		||||
	// new connection is slow.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,6 +11,7 @@
 | 
			
		|||
        "10.33.33.7:4218"
 | 
			
		||||
      ],
 | 
			
		||||
      "timeout": "5s",
 | 
			
		||||
      "poolSize": 100,
 | 
			
		||||
      "tls": {
 | 
			
		||||
        "caCertFile": "test/redis-tls/minica.pem",
 | 
			
		||||
        "certFile": "test/redis-tls/boulder/cert.pem",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue