Connect using SRV records #2067
-
| 
         I am using a client with a long-lived connection to a remote server. The server DNS use SRV records instead of static IP addresses. What is the best way, using undici, to handle reconnects etc? Do I need to resolve the SRV records before every fetch or is there a more efficient way?  | 
  
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            metcoder95
          
      
      
        Jul 6, 2023 
      
    
    Replies: 1 comment 2 replies
-
| 
         Hey @luddd3, did you find a solution to this?  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    2 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
I would say that I've not faced this problem yet, although you can customize the behaviour and the way to use sockets while connecting to servers by passing a custom
connectfunction at the Client level, see: https://undici.nodejs.org/#/docs/api/Client?id=example-custom-connectorThis can help you run your own custom resolutions everything a socket connection is made