I have a site that will normally be hosted from a specific machine. However, the machine will not always be available and in those times, I want the site to be hosted from another server.
What I am looking for is some sort of system that will detect whether the primary server is online, and if so, serve the site and files from there, and if not, then server from the backup.
Does anyone know of a way to accomplish this?
Thanks.
TheCPUWizard
July 26th, 2007, 01:56 PM
It is typically done with an NLB. You point everyone to the NLB, and it distributes the requests according to system states and other rules.
Synetech
July 26th, 2007, 02:03 PM
That sounds familiar. I remember there being a lot of this sort of thing several years ago (around 1998). The thing is that I need it to support path forwarding (eg blah.com/foo/bar/baz.zip should forward to 12.12.12.12/foo/bar/baz.zip or else 23.23.23.23/foo/bar/baz.zip) as opposed to a “pick a mirror” site at the root.
I tried thinking of some ways to do it myself, but it seems to be a lot harder than it seems at first blow.
All I really want is to make sure that my software is available at night when my system is off. Any tips on how to do it?
TheCPUWizard
July 26th, 2007, 02:46 PM
That sounds familiar. I remember there being a lot of this sort of thing several years ago (around 1998). The thing is that I need it to support path forwarding (eg blah.com/foo/bar/baz.zip should forward to 12.12.12.12/foo/bar/baz.zip or else 23.23.23.23/foo/bar/baz.zip) as opposed to a “pick a mirror” site at the root.
I tried thinking of some ways to do it myself, but it seems to be a lot harder than it seems at first blow.
All I really want is to make sure that my software is available at night when my system is off. Any tips on how to do it?
If you are going to turn "blah.com" off, then requests directed to that IP will die. Pure and simple.
An alternative is to unregister you domain from your IP, and register it with a "Dynamic DNS" service provider. I use http://www.dyndns.com/ for sites where I want this type of functionallity.
This is a front end solution as you had mentioned, but at least you dont need to buy any hardware.
ps: You turn systems off???? :confused: :confused: :confused: Most of my systems have be up since the last major power interruption back in 2005.
Synetech
July 26th, 2007, 03:07 PM
If you are going to turn "blah.com" off, then requests directed to that IP will die. Pure and simple.
It’s not blah.com that goes down at night, it’s my IP.
An alternative is to unregister you domain from your IP, and register it with a "Dynamic DNS" service provider. I use http://www.dyndns.com/ for sites where I want this type of functionallity.
That’s what I’m using, but it does not provide backup server/mirror functionality. I need a way of making blah.dyndns.org (or blah.shorturl.com, etc.) detect when 12.12.12.12 is online and redirect to that, otherwise redirect to 23.23.23.23.
ps: You turn systems off???? :confused: :confused: :confused: Most of my systems have be up since the last major power interruption back in 2005.
I pay for electricity.
My system isn’t a dedicated server; it does not one need to be on 24/7, so there is no sense in leaving it on, burning electricity, spewing heat, and doing nothing for several hours every day.
I’ll leave it on while I sleep if it’s doing something that takes a while like converting a long video, compressing some giant things, downloading something big, etc. or if I’m only going to be snapping for an hour or two, but that’s pretty much it.
I take it that you have not watched Inconvenient Truth have you? Do you also leave your car on at night so that it’s ready to go in the morning?
TheCPUWizard
July 26th, 2007, 04:01 PM
It’s not blah.com that goes down at night, it’s my IP.
That’s what I’m using, but it does not provide backup server/mirror functionality. I need a way of making blah.dyndns.org (or blah.shorturl.com, etc.) detect when 12.12.12.12 is online and redirect to that, otherwise redirect to 23.23.23.23.
So then the code that is running on blah.com (which accesses 12.12.12.12) needs to switchover to 23.23.23.23. So just register a name as dyndns.com. When you shut your machine (12.12.12.12)down, have it automatically update dyndns.com to point to 23.23.23.23. When it comes back up, again you update dyndns.com
I pay for electricity.
My system isn’t a dedicated server; it does not one need to be on 24/7, so there is no sense in leaving it on, burning electricity, spewing heat, and doing nothing for several hours every day.
I’ll leave it on while I sleep if it’s doing something that takes a while like converting a long video, compressing some giant things, downloading something big, etc. or if I’m only going to be snapping for an hour or two, but that’s pretty much it.
Experience (30+ years) has shown that the "shock" of turning on/off electronic components (including the associated temperature cycling) will significantly shorten the life span of many devices.
For example (based upon an industry study from 2004. An IDE disk drive which is left running at a stable temperature between 35c and 45c has an average lifespan of 7 years. The same model drives, cycles at 12 hours on, 12 hours off (allowing the temperature to drop to an ambient of 25c) had a 5.5 year span.
I take it that you have not watched Inconvenient Truth have you? Do you also leave your car on at night so that it’s ready to go in the morning?
Yes I have watched it. Almost everything there is skewed from the truth (as are most items of this type on both sides)
No I dont leave it on at night, but during the winter I do keep a block heater on it, and during the summer I use remote start 10 minutes before I go out.
Synetech
July 26th, 2007, 04:41 PM
So then the code that is running on blah.com (which accesses 12.12.12.12) needs to switchover to 23.23.23.23. So just register a name as dyndns.com. When you shut your machine (12.12.12.12)down, have it automatically update dyndns.com to point to 23.23.23.23. When it comes back up, again you update dyndns.com
Hmmm, that sounds good. It may even be easy to do, I can run the updater or something on shutdown to update the IP, then use another one on startup to point back. I’ll just have to make sure that it doesn’t violate some sort maximum-updates policy.
Thanks for the idea, it may just work like a charm. :thumb:
Experience (30+ years) has shown that the "shock" of turning on/off electronic components (including the associated temperature cycling) will significantly shorten the life span of many devices.
For example (based upon an industry study from 2004. An IDE disk drive which is left running at a stable temperature between 35c and 45c has an average lifespan of 7 years. The same model drives, cycles at 12 hours on, 12 hours off (allowing the temperature to drop to an ambient of 25c) had a 5.5 year span.
Except that it is not as much of a concern these days as it was a long time ago. First of all, the “startup shock” is nothing like it used to be (technology has come a ways), and second, physical lifespans these days far outlast useful lifespans.
Moreover, hardware is a lot tougher than people tend to think. I know they seem to break really easy when you lose something (I had an IBM HD that died when the power went out :confused: :mad:), but I’ve also seen hardware put through some shocking abuse and still work. There’s a video on YouTube of some kids destroying a GameCube and it still worked. About 15 years ago, there was a tech guy who used to press down on and bend the platters of a spinning HD while it was actively working during his presentations.
I can’t afford to replace anything, so I don’t bother turning on my computer if I would only be using it for a couple of hours; I’ll just leave it off and use it the next day. That said, I always turn it off when I won’t be using it for several hours.
You don’t leave lights on all the time do you? You may want to watch that episode of Mythbusters where they proved that it is more economical to turn lights off (all kinds of lights) when not in use.
Yes I have watched it. Almost everything there is skewed from the truth (as are most items of this type on both sides)
The details are not important, the irrefutable fact is that ALL electronics generate heat, that’s what happens when electrons move in anything but theoretical universes. Also, unless you are using solar power, your systems use power of some sort. It is at best wasteful to leave a computer on doing nothing, burning power, and emitting heat.
Like I said, my system is not a server, and does not need to be on 24/7, so there’s no reason to leave it on. Even if parts start to fail in five years, from turning it on six times per week, it would not matter much because they would be far obsolete and in need of replacement anyway. I don’t know about your systems, but anything that is idle for any decent length of time should be off.
No I dont leave it on at night, but during the winter I do keep a block heater on it, and during the summer I use remote start 10 minutes before I go out.
You leave it on all the time? Is it outdoors? Can’t you just use anti-freeze and a remote to warm it up while you eat breakfast? Ten-minute—heck, any—warm up in summer? Where do you live, the North Pole?
Are you one of those people who has A/C in your house, car, work, clothes, etc.? I hate it when rich people don’t/can’t appreciate just how bloody hot it is these days. You can always throw on an extra sweater in the winter, but in the summer, once you’ve stripped your skin off, there isn’t much more you can do. Plus, sweaters and even heaters are cheaper than A/C; we are not rich but can survive the winter, not the summer though.
Oh, and I can’t leave my system on in the summer, I can’t even turn it on when I am using it because it’s just too bloody hot, it won’t work in this kind of heat.
TheCPUWizard
July 26th, 2007, 05:38 PM
This is geting very non technical, would you mind if I asked a moderator to split the thread so "technology" stays here, but these topics get moved to chit-chat?
In any case, I am definately not rich. I live and work in NYC, where the income levels are a bit higher than elsewhere, but so are the expenses.
My house stays 70(f) degrees year round while there is someone home (or anticipated home). Up to 78 when vacant during the summer, down to 65 during the winter. My monthly utility bills (gas & electric) average $700 a month over the course of a year.
My "modern" systems draw about 1KW when active and 300W when idle. This is much lower than my classic systems (from 1968-1985) that draw 4.2KW when turned on (at least 4 times a year for 48 hours). During the winder, the heat generated (inefficiently) assists the houses heating systems, but during the summer, the computer room (located in my basement) uses a ground water heat pump to help dissipate the heat.
Regarding the "economics" of leaving the lights on vs. turning them off; my entire house is set up with the lights X-10 controlled with motion sensors. One of the things that is never covered in evaluations (such as MythBusters), is the "cost" of the inconvience of having to deal with bulbs that burn out. Having them set for 15 minutes of idle time, works as the best balance for me.
I also agree that hardware has become much more tolerant (who remembers "stiction" on ST-4038s???), but the study I am refering to is only 3 years old, and the mechanics of hard drives has not changed much in that time.
Since you tend to keep your machines off, I am assuming that you never need access to your information when you are not at home. I, on the other hand need constant availability. I can walk into most McDonalds or Burger Kings here and sit down at one of their computers, and it is just as if I am at home. Of course I can also do this with my laptop (with T-Mobile) or my PDA (Pocket PC).
Synetech
July 26th, 2007, 06:24 PM
This is geting very non technical, would you mind if I asked a moderator to split the thread so "technology" stays here, but these topics get moved to chit-chat?
Sure, np; but you started the OT :p
I’ll post my results here. (There’s a website that does an interesting script thing where they allow visitors to see which mirrors are online, which have the latest version, etc. done with a script.)
My monthly utility bills (gas & electric) average $700 a month over the course of a year.
:eek: :eek: :eek: Incomes danm well better be higher.
One of the things that is never covered in evaluations (such as MythBusters), is the "cost" of the inconvience of having to deal with bulbs that burn out.Actually, they did. Besides, inconvenience? It’s not like 300 bulbs would burn out every week, how inconveinient is it to replace two or three bulbs every few years? (I’m talking about homes, not offices, but even they are supposed to turn off the lights at night.)
I also agree that hardware has become much more tolerant (who remembers "stiction" on ST-4038s???), but the study I am refering to is only 3 years old, and the mechanics of hard drives has not changed much in that time.Again, due to the continuing steady growth of technology, most parts are rendered obsolete before they physically die, so it’s not that much of an issue.
Since you tend to keep your machines off…
Actually, I keep it on because I’m usually using it. I turn it off when I sleep, or just not turn it on in the morning if I’m going out (going out, not popping out), spending the day watching tv/movies, reading, etc.
… I am assuming that you never need access to your information when you are not at home. I, on the other hand need constant availability. I can walk into most McDonalds or Burger Kings here and sit down at one of their computers, and it is just as if I am at home. Of course I can also do this with my laptop (with T-Mobile) or my PDA (Pocket PC).
Sure I do, and not just when I’m out. It’s very annoying when I’m watching something or reading a book and suddenly need to look something up, check a website, or get an idea to solve a problem with one of my projects or whatever and the computer is off. But, that doesn’t offset the expense (money, heat, and fuel wise) of keeping it on. I just jot it down on a pad and deal with it the next time that I’m on the computer. I don’t have as much need when I’m out, but it’s the same story. Also, I would just get a laptop if I did spend that much time away.
I don’t think we even have computers in fast-food restaurants here.
PeejAvery
July 26th, 2007, 06:35 PM
That would be a lot of work to split up the technical aspect with the "chit-chat" part since it is mixed in many posts. For now, stay on track, and if you must go off, just take it to the chit-chat forum or to private messaging.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.