sintaxi / surge

CLI for the surge.sh CDN
https://surge.sh
2.88k stars 138 forks source link

Site unavailable #67

Closed cfjedimaster closed 9 years ago

cfjedimaster commented 9 years ago

Ugh - so I migrated DNS for javascriptcookbook.com to point to the Surge hosted site. It ran fine. I then modified index.html a bit and did a surge.

While it was working, I hit the site, as I was curious what it would say. It reported:

This website is temporarily unavailable, please try again later.

Ok, fine, but then when the surge was done, it still said that.

cfjedimaster commented 9 years ago

Ok, it is back. It was down for maybe 3-4 minutes. Not the end of the world, but concerning. Any ideas?

cfjedimaster commented 9 years ago

As just an FYI, another push, and down again. Again, if this is expected, sorry to bug.

cfjedimaster commented 9 years ago

And again - back. Maybe I'm just being too demanding. ;)

cfjedimaster commented 9 years ago

Ugh - no - it isn't. SOme pages work, some do not - like the Search/About.

cfjedimaster commented 9 years ago

Yeah, it appears random. I did another surge. Some pages work, some don't.

cfjedimaster commented 9 years ago

Hmm, it could be caching too. Did a shift-reload and the bad pages came up. But that seems like an issue still to me. (And again, sorry for all the noise, but I figure the more data for you guys the better.)

sintaxi commented 9 years ago

oh dang. all hands are on deck looking into it.

sintaxi commented 9 years ago

@cfjedimaster Im seeing the site fine at http://www.javascriptcookbook.com. Were you expecting it to also be available at http://javascriptcookbook.com ?

cfjedimaster commented 9 years ago

Yes and no. I didn't expect Surge to handle nonwww to www, I did that myself at GoDaddy. And - crap - it was working earlier. That's one has to be me though, not you.

On Tue, Mar 10, 2015 at 12:56 PM, Brock Whitten notifications@github.com wrote:

@cfjedimaster https://github.com/cfjedimaster Im seeing the site fine at http://www.javascriptcookbook.com. Were you expecting it to also be available at http://javascriptcookbook.com ?

— Reply to this email directly or view it on GitHub https://github.com/sintaxi/surge/issues/67#issuecomment-78110193.

Raymond Camden, Developer Advocate for MobileFirst at IBM

Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: raymondcamden

cfjedimaster commented 9 years ago

Weird - it just auto forwarded for me on my second test. Again though - that part - if an issue - is on GoDaddy, not you (or so I assume anyway).

On Tue, Mar 10, 2015 at 1:03 PM, Raymond Camden raymondcamden@gmail.com wrote:

Yes and no. I didn't expect Surge to handle nonwww to www, I did that myself at GoDaddy. And - crap - it was working earlier. That's one has to be me though, not you.

On Tue, Mar 10, 2015 at 12:56 PM, Brock Whitten notifications@github.com wrote:

@cfjedimaster https://github.com/cfjedimaster Im seeing the site fine at http://www.javascriptcookbook.com. Were you expecting it to also be available at http://javascriptcookbook.com ?

— Reply to this email directly or view it on GitHub https://github.com/sintaxi/surge/issues/67#issuecomment-78110193.

Raymond Camden, Developer Advocate for MobileFirst at IBM

Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: raymondcamden

Raymond Camden, Developer Advocate for MobileFirst at IBM

Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: raymondcamden

sintaxi commented 9 years ago

I did a quick hack on our end to have javascriptcookbook.com set to serve www.javascriptcookbook.com. That should buy us some time.

sintaxi commented 9 years ago

@cfjedimaster Im guessing things went wonky when you changed your DNS settings and the redirect started to fail for whatever reason. We haven't had any process restarts on our end and only had things published at www.javascriptcookbook.com which seems to be working fine. I say we just fast issue #64 so you don't have to deal with that yourself. Make sense? Meantime surge is serving both www and non-www.

Let me know if you think I'm mistaken.

cfjedimaster commented 9 years ago

Well, I think the jscb->www.jscb isn't the issue though. To me, requests were coming back with "This website is temporarily unavailable, please try again later." which is my main concern. What me to surge again and see if I can reproduce it?

On Tue, Mar 10, 2015 at 1:19 PM, Brock Whitten notifications@github.com wrote:

@cfjedimaster https://github.com/cfjedimaster Im guessing things went wonky when you changed your DNS settings and the redirect started to fail for whatever reason. We haven't had any process restarts on our end and only had things published at www.javascriptcookbook.com which seems to be working fine. I say we just fast issue #64 https://github.com/sintaxi/surge/issues/64 so you don't have to deal with that yourself. Make sense? Meantime surge is serving both www and non-www.

Let me know if you think I'm mistaken.

— Reply to this email directly or view it on GitHub https://github.com/sintaxi/surge/issues/67#issuecomment-78114863.

Raymond Camden, Developer Advocate for MobileFirst at IBM

Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: raymondcamden

kennethormandy commented 9 years ago

Hm, I was thinking maybe you had www and non-www versions saved in your history or something, so when you went to www.javascriptcookbook.com it worked but when you went to http://javascriptcookbook.com/about it looked like it was down (even though there was actually no site at the non-www version and the www version was still up).

If you want to deploy see if it happens again, that would definitely be helpful, yeah! Thanks for all the details.

cfjedimaster commented 9 years ago

Ah.... ok. I can see the browser doing that. I'll do a surge and ensure I've got the www in all my tests.

kennethormandy commented 9 years ago

It should work either with or without the www now thanks to @sintaxi’s quick fix :) And we’ll have an on-going solution for that once we close #64

cfjedimaster commented 9 years ago

Ok, it seems kosher now. I also noticed I could hit my home page while surge was still working on the CDN, which is cool. Not that it takes long, but I'm glad things can remain accessible while an update is going on. Thanks gang - appreciated.

sintaxi commented 9 years ago

Good to hear @cfjedimaster. Thanks for reporting. Just to explain a bit whats going on...

Files on all edge nodes are stored based on their sha256 and the edge nodes references the file based on a manifest (file tree) of the application. This manifest is given to the edge nodes anytime it requests a new one.

When a new build happens the edge nodes are told to expire their manifest and request a new one. This way, no requests are ever dropped.

sintaxi commented 9 years ago

@cfjedimaster The auto-redirect feature has been shipped and so I removed the hack I did earlier in the day. Here is example (note how it redirects to www).

http://javascriptcookbook.com/article/Check-if-a-value-is-an-array/

Let me know if this is what you were looking for.

cfjedimaster commented 9 years ago

That worked, but to be clear, I thought it was the job of my DNS provider to do this, not Surge. At GoDaddy, I had set up a forwarding rule for javascriptcookbook.com to auto forward to www.etc. Shouldn't that have been enough? I don't think Surge should do it as I can imagine some folks may want to host at soandso.com and not use www. (Maybe, I don't know. I've seen some sites prefer not using www.)

On Wed, Mar 11, 2015 at 5:15 AM, Brock Whitten notifications@github.com wrote:

@cfjedimaster https://github.com/cfjedimaster The auto-redirect feature has been shipped and so I removed the hack I did earlier in the day. Here is example (note how it redirects to www).

http://javascriptcookbook.com/article/Check-if-a-value-is-an-array/

Let me know if this is what you were looking for.

— Reply to this email directly or view it on GitHub https://github.com/sintaxi/surge/issues/67#issuecomment-78236599.

Raymond Camden, Developer Advocate for MobileFirst at IBM

Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: raymondcamden

marvinroger commented 9 years ago

Non-WWW <-> WWW is a best practice. If you want to serve rootlevel.com, you don't want www.rootlevel.com to show an error, you want it to be redirected to rootlevel.com, as a lot of users are used to type www.

cfjedimaster commented 9 years ago

Oh I agree. I'm just curious why this would be Surge's job vs GoDaddy?

On Wed, Mar 11, 2015 at 5:53 AM, Marvin Roger notifications@github.com wrote:

Non-WWW <-> WWW is a best practice. If you want to serve rootlevel.com, you don't want www.rootlevel.com to show an error, you want it to be redirected to rootlevel.com, as a lot of users are used to type www.

— Reply to this email directly or view it on GitHub https://github.com/sintaxi/surge/issues/67#issuecomment-78241886.

Raymond Camden, Developer Advocate for MobileFirst at IBM

Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: raymondcamden

marvinroger commented 9 years ago

Not every DNS providers provide HTTP redirections, as this is independant from a DNS server - it requires an HTTP server -. DigitalOcean doesn't for example. They recommend to redirect server-side.

So I think this is a good thing that Surge handles Non-WWW <-> WWW, because I would not want to change my DNS provider (DO) to use Surge. After all, GH Pages do it, why not Surge? :)

cfjedimaster commented 9 years ago

Fair enough! On Mar 11, 2015 6:15 AM, "Marvin Roger" notifications@github.com wrote:

Not every DNS providers provide HTTP redirections, as this is independant from a DNS server - it requires an HTTP server -. DigitalOcean doesn't for example. They recommend to redirect server-side.

So I think this is a good thing that Surge handles Non-WWW <-> WWW, because I would not want to change my DNS provider (DO) to use Surge

— Reply to this email directly or view it on GitHub https://github.com/sintaxi/surge/issues/67#issuecomment-78244766.