Ruby Client-Server Interaction Delays
CommentsI have an XML-RPC client and server on Ruby implemented using standard libraries. If client has no proper DNS record I see 10 seconds delay in my case for setting up the connection. I could fix DNS records on my environment, but I couldn’t do it for every customer who experience this problem and use my client-server application.
So I start searching on how to disable DNS lookup. After investigation I confirmed that delay occurs on the server side. I’m using XMLRPC::WEBrickServlet for server and tried to search for needed option but without success. The lookup controlled on much lower level. To disable it need to add the following to server code:
Socket.do_not_reverse_lookup = true