-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hosting: Move from github pages #57
Comments
However, it's possible to just move now to Heroku, then improve piece-wise. The main mental block is I'm loath to lose Rawgit ability to link to any version, but Rawgit doesn't (yet) work on mathdown due to submodules anyway. |
In progress: now works on https://mathdown.herokuapp.com and https://mathdown-cben.rhcloud.com. |
Problem: Heroku's free 1-dyno per app idles when it gets 0 traffic for a hour. 320 ms First Byte Time http://www.webpagetest.org/performance_optimization.php?test=150129_3E_R06&run=1&cached=0 (running)
=> I'm thinking moving off Heroku to a docker setup on a Digital Ocean box. $5~10 should be enough, including SSL. |
Turns out the "free" Openshift plan also idles, and waking up felt way slower than 10sec. |
Yay, bronze plan worked now. |
|
Uh-oh: warning in Openshift console: |
Heroku broke: lots of 404 - apparently for everything in submodules. |
=> Yes, git push to heroku works, auto sync from github breaks submodules. Heroku doesn't exactly document this, but https://devcenter.heroku.com/articles/git-submodules says:
I just made an unrelated commit to github, which triggered this in
so it's plausible that "Builds created with the API do not resolve submodules." applies... A direct manual push prints this to my terminal:
Sadly neither
vs
P.S. This wouldn't happen if testing used immutable infrastructure in the Right way: |
Back to Openshift quota issue.
So inodes are tight but overall space is also 60% used. Notable, partially overlapping, parts of storage used: AFAICT app-root vs app-deployments/2015... are copies, not symlinks nor hardlinks. app-root/logs contains miniscule haproxy logs and 10x10M nodejs.log* consiting of stdout/err from my server.js.
[Interesting. That's a LOT of hits for /, especially for a server not linked to almost anywhere on the net. Though the domain has existed for a long time.] After running
|
inodes issue split to #73 |
RHcloud* Bronze plan lets me auto-scale to 16 gears. First 3 small gears are free but 13 more would cost me pretty $190/month. *I've been saying "Openshift" interchageably till now but to be precise Openshift is the software (open source) and RHcloud is the hosted instance run by RedHat. |
Fixed inodes quota blocker, ready to flip mathdown.net to RHcloud! :-) |
For the record: Heroku has a handy "[Production Check]" button on top right.
|
…d -some related files: - DNS config downloaded from Cloudflare - TLS certificates, the public parts (keeping to myself StartSSL.com browser-identifiying cert, and private key used for mathdown.{com,net} certs) ("Best practises" example for publicly committing certs: https://github.com/18F/tls-standards/tree/master/sites/)
Load test (using Blitz addon via Heroku) shows that Heroku can sustain more load: while RHcloud gives goes into high latency and up to 50% errors around 170 users: I don't expect to see that many users soon (though IIUC that's 250 HTTP requests, not 250 full page loads) but what bothers me:
=> OK, let's force scaling by configuring 2–5 gears? I'm going to keep 2–5 as it allows fast failover if one crashes. And because why not... |
Correction: not zero errors: TCP Connection timeout 3 So now I know what kind of errors they were. The good news is that this exlains why I'm was not seeing any kind of errors in Haproxy status screen (which I'm not sure how to read but all "denied", "errors" etc. were 0). |
Pushed new version (minor server.coffee change) to Heroku and RHcloud.
It's not very clear why it's so slow, it just is... (e.g. what happened between 0:08–1:01?) What's most striking is that it first stops the app, then builds, then starts — that's ~6min of downtime?! Ah, there is option to move build outside the 1st gear by offloading it to a Jenkins cartridge. Don't think I want it. |
OK, I just flipped mathdown.net to RHcloud! |
Closing this issue as essentially done. |
Heroku has new pricing I've switched to the new free and reactivated the uptimerobot once-in-2h ping to see how it works. |
It's becoming untenable to deploy via github pages with submodules but no build step and server logic.
dist/firepad.js
. Need a build step.My ideal would be something that can run any commit from anybody's fork.
Ideally, user should be able to switch code version via cookie without changing document URLs.
Think Rawgit + build transforms (like https://github.com/jesusabdullah/browserify-cdn) + containerized execution of server code.
The last part is hardest. I think the practical approach is layered:
markdown+foo-bar
dialects and filters (either server->json->client javascript->json->server, or Lua filters).The text was updated successfully, but these errors were encountered: