{"id":452,"date":"2009-08-17T20:28:00","date_gmt":"2009-08-18T01:28:00","guid":{"rendered":"http:\/\/appcrawler.com\/wordpress\/?p=452"},"modified":"2011-11-06T15:27:02","modified_gmt":"2011-11-06T20:27:02","slug":"how-does-connection-re-direction-occur-in-rac-part-1","status":"publish","type":"post","link":"http:\/\/appcrawler.com\/wordpress\/2009\/08\/17\/how-does-connection-re-direction-occur-in-rac-part-1\/","title":{"rendered":"How does connection re-direction occur in RAC? (Part 1)"},"content":{"rendered":"<p>I have always been curious as to how a connection request is redirected in a RAC.  In other words, let&#8217;s assume we have a two node cluster with a given service that only runs on one of the nodes.<\/p>\n<p>In this case the reqman service runs only on linux1.  In our URL, we only have the linux2 node listed.  This ensures the connection request will need to be &#8220;handled&#8221; in some way to ensure it makes to the &#8220;right&#8221; server.<\/p>\n<pre lang=\"text\">\r\nlinux1-vip = 192.168.1.150\r\nlinux2-vip = 192.168.1.154\r\nclient     = 192.168.1.70\r\n<\/pre>\n<p>On the client, we then use tcpdump to capture all packets on the interface used to connect.<\/p>\n<pre lang=\"text\">\r\ntcpdump -iwlan0 -n tcp port 1521 -A -s1500\r\n<\/pre>\n<p>In another window, we use our TNS alias to connect to the service using the configuration noted at the beginning of this article.<\/p>\n<p>Below, we snip much of what was output, and leave only the relevant lines.<\/p>\n<p>We first see our request going to linux2&#8230;<\/p>\n<pre lang=\"text\">\r\n20:00:47.603134 IP 192.168.1.70.40133 > 192.168.1.154.oracle: P 1:216(215) ack 1 win 46 <nop,nop,timestamp 3430702 217586020>\r\nE...1.@.@......F........B.h..2.......F.....\r\n.4Y....d.........:.,.A ............:....AA........................\r\n(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linux2-vip)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ReqMan)(CID=(PROGRAM=python@HOWARDS)(HOST=HOWARDS)(USER=root))))\r\n<\/pre>\n<p>&#8230;and shortly thereafter, a return packet is sent back to the client.  Notice it contains a reference to linux1-vip&#8230;<\/p>\n<pre lang=\"text\">\r\n20:00:47.606520 IP 192.168.1.154.oracle > 192.168.1.70.40133: P 11:268(257) ack 216 win 1716 <nop,nop,timestamp 217586021 3430702>\r\nE..5..@.@.-........F.....2..B.i............\r\n...e.4Y..........\r\n@(ADDRESS=(PROTOCOL=TCP)(HOST=linux1-vip)(PORT=1521)).(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linux2-vip)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ReqMan)(CID=(PROGRAM=python@HOWARDS)(HOST=HOWARDS)(USER=root))(SERVER=dedicated)(INSTANCE_NAME=tst10g1)))\r\n<\/pre>\n<p>&#8230;and a few milliseconds after that, we see our client connecting to linux1&#8230;<\/p>\n<pre lang=\"text\">\r\n20:00:47.615509 IP 192.168.1.70.39634 > 192.168.1.150.oracle: P 1:257(256) ack 1 win 46 <nop,nop,timestamp 3430715 673836178>\r\nE..4..@.@......F...2....B..#..T<....E......\r\n.4Y;()...........:.,.A ............:....AA........................\r\n(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linux2-vip)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ReqMan)(CID=(PROGRAM=python@HOWARDS)(HOST=HOWARDS)(USER=root))(SERVER=dedicated)(INSTANCE_NAME=tst10g1)))\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I have always been curious as to how a connection request is redirected in a RAC. In other words, let&#8217;s assume we have a two node cluster with a given service that only runs on one of the nodes. In&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"http:\/\/appcrawler.com\/wordpress\/2009\/08\/17\/how-does-connection-re-direction-occur-in-rac-part-1\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"footnotes":""},"categories":[19,22],"tags":[],"_links":{"self":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/452"}],"collection":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/comments?post=452"}],"version-history":[{"count":15,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/452\/revisions"}],"predecessor-version":[{"id":462,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/452\/revisions\/462"}],"wp:attachment":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/media?parent=452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/categories?post=452"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/tags?post=452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}