mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 02:03:20 -04:00 
			
		
		
		
	Plugin/Forward - autotune the dialTimeout for connection (#1852)
* - implement an auto-tunable dialTimeout for fallback. * - fix gofmt * - factorized timeout computation with readTimeout / updated readme / * - fix comment
This commit is contained in:
		
				
					committed by
					
						 Miek Gieben
						Miek Gieben
					
				
			
			
				
	
			
			
			
						parent
						
							6f865a9de7
						
					
				
				
					commit
					70c957d885
				
			| @@ -106,9 +106,8 @@ func (p *Proxy) start(duration time.Duration) { | ||||
| } | ||||
|  | ||||
| const ( | ||||
| 	dialTimeout = 4 * time.Second | ||||
| 	timeout     = 2 * time.Second | ||||
| 	maxTimeout  = 2 * time.Second | ||||
| 	minTimeout  = 10 * time.Millisecond | ||||
| 	hcDuration  = 500 * time.Millisecond | ||||
| 	timeout    = 2 * time.Second | ||||
| 	maxTimeout = 2 * time.Second | ||||
| 	minTimeout = 10 * time.Millisecond | ||||
| 	hcDuration = 500 * time.Millisecond | ||||
| ) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user