FreeBSD/Routing Question - Techs Check This Out

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jon2
    So Fucking Banned
    • Aug 2001
    • 2875

    #1

    FreeBSD/Routing Question - Techs Check This Out

    Okay...I wanna see what ya'll know about this...

    Working with 2 servers at 2 seperate datacenters...For reference Server A will be the main server and Server B will be the apache server...

    I am setting up a routing scheme that basically involves having Server A route ip traffic to server B without doubling the bandwidth.

    So I looked into using iptables and nats but that would use the same ammount of bandwidth on Server A and Server B...

    I wanna do something similar as redirecting a request using apache...You know when you do a htaccess and put in redirect /folder http://www.otherserver.com/folder ... you know how that only uses b/w on otherserver.com not on the original server...

    Basically I don't wanna do dns because that will lead to cacheing of the ip addresses and I plan on having the main box to handle redundacy of the secondary box(es)...

    So is there another way to handle sending the traffic from *.domain.com to another ip without using DNS but using Server A to direct it?

    Everything on domain.com and www.domain.com will be served by server A and Server B needs to handle *.domain.com

    Okay any help is appreciated...

    Bumps are nice too

    Jon
  • prodiac
    Confirmed User
    • Sep 2003
    • 419

    #2
    So you want to host www.domain.com and *.domain.com on seperate servers .. But you don't want to use DNS to point *.domain.com to the second server?

    That honestly is the best way to do it .. It would be the fastest way. Otherwise you could do as you said with an apache redirect, and that would be changing the url in to browser to something else (an ip of server b?).

    Comment

    • darksoul
      Confirmed User
      • Apr 2002
      • 4997

      #3
      short answer: No.

      Use dns with a low ttl it should suffice.
      Last edited by darksoul; 01-07-2005, 09:40 PM.
      1337 5y54|)m1n: 157717888
      BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
      Cambooth

      Comment

      • Jon2
        So Fucking Banned
        • Aug 2001
        • 2875

        #4
        Yeah I don't wanna use DNS just in case anything should happen with the uptime to Server B I would like to program a script that will change the traffic to Server A until Server B is back online...

        I don't wanna change the urls...I figure using some kinda routing thing on the box that when a certain ip is called it redirects it to another ip...But doesn't like change the url...The surfer never notices...Some kinda internal switch of ip's...

        Not sure if I want something thats impossible to do...heh

        Jon

        Comment

        • Jon2
          So Fucking Banned
          • Aug 2001
          • 2875

          #5
          Originally posted by darksoul
          short answer: No.

          Use dns with a low ttl it should suffice.
          Really?

          I don't like the answer no...heh...

          So if I hosted the DNS on Server A I could set it so it doesn't cache or has like a constant update time on the pointing ip?

          Jon

          Comment

          • prodiac
            Confirmed User
            • Sep 2003
            • 419

            #6
            You'd honestly be better off programming your script to automatically change DNS if needed. DNS Changes are almost instant now anyway ..

            It's the best way to do this, any other way will slow down your site.

            Comment

            • DavidVH
              Confirmed User
              • May 2004
              • 300

              #7
              http://www.inlab.de/balance.html

              Comment

              • darksoul
                Confirmed User
                • Apr 2002
                • 4997

                #8
                Only the network admins get to play with routing, you've got no power
                over that. And talking about playing with the routes between two dc'es..., heh.
                What you want is a load balancing solution.
                1 - Server gets all the requests and redirects to the slaves,
                but you'd still have a point of failure so it wouldn't justify its cost.
                The best solution is dns, with a script that checks the servers
                and removes them from dns when they're down.
                1337 5y54|)m1n: 157717888
                BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
                Cambooth

                Comment

                • Jon2
                  So Fucking Banned
                  • Aug 2001
                  • 2875

                  #9
                  I do wish there was some ip forwarding setup...I guess we all have dreams...heh...

                  I just don't wanna make Server A use the same bandwidth as Server B...That would almost defeat the purpose of the way I am setting things up...

                  Jon

                  Comment

                  • darksoul
                    Confirmed User
                    • Apr 2002
                    • 4997

                    #10
                    Originally posted by qualitythumbs
                    Really?

                    I don't like the answer no...heh...

                    So if I hosted the DNS on Server A I could set it so it doesn't cache or has like a constant update time on the pointing ip?

                    Jon
                    Use two nameservers, one on Server A and the other one on Server B,
                    along with the script that checks the other server for availability its the
                    best/reliable/cheap setup you can get.

                    It wasn't specifyed so far, but I assume you know when we're talking about DNS
                    we're reffering to Round Robin DNS.
                    Last edited by darksoul; 01-07-2005, 09:50 PM.
                    1337 5y54|)m1n: 157717888
                    BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
                    Cambooth

                    Comment

                    • Jon2
                      So Fucking Banned
                      • Aug 2001
                      • 2875

                      #11
                      Originally posted by DavidVH
                      I think I might love you...

                      Does this make Server A use the same ammount of bandwidth as Server B?

                      Jon

                      Comment

                      • Jon2
                        So Fucking Banned
                        • Aug 2001
                        • 2875

                        #12
                        Bump

                        Jon

                        Comment

                        Working...