OpenVZ Forum - RDF feed
type: channel
items: 20 second delay with private ip address
items: Re: 20 second delay with private ip address

20 second delay with private ip address
type: item
description: Hi, I run into a strange problem which I call "20 second delay" problem. I found that this huge delay is caused by the private ip of the 've database'. Well, I got a pc with 3 VEs: ve reverse proxy (82.xx.xx.xx public ip) | ve webserver (192.168.90.20 private ip) | ve database (192.168.90.30 private ip) The 've reverse proxy' talks to the 've webserver' and this talks to the 've database'. Basically everything works BUT a reply from the database takes ca. 20 seconds! When I change the 've database' ip from private ip to a public ip then everything works very fast, no delay. Though, I do not want the database to have a public ip. I know that the information I provide is pretty vague. Please, could anyone point me into the right direction? Do I have to deal with 'routing' or something? When I enter the 've webserver' and there do a 'ping 192.168.90.30' to the 've database' I get: [root@webserver]# ping 192.168.90.30 PING 192.168.90.30 (192.168.90.30) 56(84) bytes of data. From 82.xx.xx.xx: icmp_seq=1 Redirect Host(New nexthop: 192.168.90.30) 64 bytes from 192.168.90.30: icmp_seq=1 ttl=64 time=0.056 ms From 82.xx.xx.xx: icmp_seq=2 Redirect Host(New nexthop: 192.168.90.30) 64 bytes from 192.168.90.30: icmp_seq=2 ttl=64 time=0.048 ms From 82.xx.xx.xx: icmp_seq=3 Redirect Host(New nexthop: 192.168.90.30) 64 bytes from 192.168.90.30: icmp_seq=3 ttl=64 time=0.030 ms 64 bytes from 192.168.90.30: icmp_seq=4 ttl=64 time=0.025 ms ... List looks similar when I enter 've database' and send ping to 've webserver'. So ping tests 've webserver' <-> 've database' in both directions work very fast (but the "Redirect Host(New nexthop" text makes me wonder). Thanks for any help and pointers.
creator: walter7788
date: 2010-01-09T17:09:39-00:00

Re: 20 second delay with private ip address
type: item
description: Latest news from my I-can't-get-it-to-work project. Short story: Is 'VETH' the way to go? http://wiki.openvz.org/Veth Long story: Spend 6 hours more for searching, reading and much testing but no success. What I noticed (and already mentioned in my first post) was, that using a public IP worked and using a privat IP failed (but I need to use a privat IP). What I did until now was simply creating 3 VEs on my server and set it up as 've reverse proxy' <-> 've webserver' <-> 've database' To 've webserver' and 've database' I assigned private IPs (192.168.x.x) but this VE <-> VE communication doesn't work properly (= 20 second response delay). Am I trying something that is technically impossible? This networking stuff is a pretty difficult matter and I'm just a beginner. It feels like walking through a heavy fog, not knowhing where to go and not seeing anything. Is this what I'm going to build a so-called 'virtual lan' or VLAN? Do I need to utilize 'VETH' in order to build my 'virtual lan'? Thanks for any input.
creator: walter7788
date: 2010-01-10T02:53:43-00:00

Re: 20 second delay with private ip address
type: item
description: That looks like a DNS timeout. Remove the reverse lookups from your applications or add the hosts to /etc/hosts in all 3 VEs. Regards,
creator: nuno
date: 2010-01-10T18:45:21-00:00

Re: 20 second delay with private ip address
type: item
description: nuno, thanks for your reply. I also was thinking of something like a timeout, tried much but no luck. Guess I did it wrong because I'm a beginner. Well, today I can report some success I configured my 've database' as 'SNAT' (for anyone who is interested please see "How to provide access for container to Internet" here: http://wiki.openvz.org/NAT ) I could access the Internet but my delay problem still existed. So I removed 'SNAT' and configured my 've database' as 'VETH' (see "Adding veth to a CT" here: http://wiki.openvz.org/Veth ). My delay problem still existed so I added 'SNAT' again. So in total I ended up with applying 'SNAT' + 'VETH' to my 've database' and voila, then it worked. No more delay While I got it to work I'm still absolutely clueless regarding networking and questions remain: While 'SNAT'+'VETH' works for me I wonder if this is the right way to do it? Thanks to anyone for input.
creator: walter7788
date: 2010-01-10T21:29:04-00:00