4 ms·
Yeah but the big question is, how can you switch the DNS over in time when NONE of your servers can respond fast enough?
by EGreg 13y ago
Yeah but the big question is, how can you switch the DNS over in time when NONE of your servers can respond fast enough?
- flyt 13y agoVery low DNS TTLs
- Retric 13y agoYou still need to update DNS ASAP, but unless your dealing with a physical flood/fire you can often get something to respond on the old IP. So, depending on the type of failure your dealing with, often setting up a static redirect is viable for insane levels of traffic even if your hosting it off of a single underpowered CPU and limited bandwidth. Aka the site has been running off your FIOS connection and a spare CPU the suddenly the taffic spikes 5,000% what do you do? Host a single short test only, sorry we where not ready for prime time please come again, or redirect to a nice scalable static site you can manually update with nice pictures of your total failures / requests for donations or whatever.
- EGreg 13y agoWhy don't you just always have your site static and connect to your back end as necessary? Treat it as a webservice with uptime, etc.
- Retric 13y agoBecause designing V0.1 of your application from the ground up based on edge cases is a Great way to never release anything. Spending a weekend setting up a static failover on the other hand has no long term downside and let's you put off worrining about a host of those edege caeses without any real down side. It's like buying a UPS for your dev box it's probably never going to matter, but it's cheap so feel free.
- EGreg 13y agoActually it's a great way to simultaneously design a website AND an api for others to use. It's also a great way to separate concerns. It's also a great way to reduce load on your server. In fact, it's an easy way to have some people code a standard back end with a standard authentication so that some other people can make front ends for the web, iphone, and more. You can use, for example, oauth to authenticate with the back end, from any front end app. http://www.discourse.org/ http://www.discourse.org/ is one example of such an approach
- Retric 13y agoI dont't think we are quite on the same page, having an public API etc is wonderful but let's use a slightly different topic. Using some 3rd party ORM to talk to your database is generally a no brainer, but v0.1 might not even have a database yet because persistence is not generally needed for a demo. Why put off such a core feature, because just changing your objects is less friction so and the goal is to see if anyone is ineested. aka idea validation and nothing else.
- EGreg 13y agoBecause it's just as easy to code your front end independently and then hook up your back end to it. If the front end is static, it can be completely hosted on a CDN. If your back end is unreachable the front end can just take another code path. There's your 0.1
- peterwwillis 13y agoHopefully your load balancers are still responding and they'll failover to an alternate working site. If not, having multiple load balancers in your DNS round robin config could allow the client to retry another record to see if it works, which is hit or miss in my experience, but others have said it works reliably. Like someone else said, low TTLs help. Or Anycast, or advertising your ASN from a new router/DC. None of that should be necessary as Amazon will take care of that for you, but only if you pay for and configure all the right services.
- dangoor 13y agoDidn't the original article mention setting Apache to redirect the requests to the static site? I would imagine that Apache (running on something better than a C64) can handle an absolutely ridiculous amount of traffic that it's just redirecting.