5 ms·
Any reason you couldn't use these for conventional web stuff? 30 seconds could easily be long enough to bring up another instance and sync data if needed.
by andybak 12y ago
Any reason you couldn't use these for conventional web stuff? 30 seconds could easily be long enough to bring up another instance and sync data if needed.
- CydeWeys 12y agoBy "conventional web stuff", do you mean serving a website or similar? Yeah, I don't think it makes sense to host a website on a service that is preemptible. You need your webserver available to respond to requests 24/7. It can't just randomly go down. Pre-emptible instances are more suited for batch processing and big data computation runs.
- comex 12y agoIf you have a website that can be distributed among arbitrarily many frontend servers, it could make sense to put them on preemptible instances, with the database on a regular instance. (In the unlikely case no preemptible instances are available, you could always automatically switch the frontend servers to regular ones.) However, I think this could only possibly be efficient pricing-wise if your traffic was extremely bursty.
- spankalee 12y agoNo reason at all. If you have enough preemptible VMs, and they spin up fast enough, then when one goes down, just spin up another. If for some reason GCE's overall preemptible spare capacity drops and you can't get a new one and it's important to you, then spin up a regular VM.
- ErikRogneby 12y agoI would say it depends on the size of your pool. 30 seconds _is not_ long enough to bring up another instance.
- hillsarealiv3 12y agoEC2 spot instances give 2 minutes notice...
- sologoub 12y agoYou'd have to make sure that if a node gets terminated while processing a request, that request can be re-routed to a live VM. Unless you don't care about users randomly seeing errors of course.
- giulianob 12y agoThey give you 30 seconds to shut down. Should be plenty of time to gracefully end your current requests and shut down the web server.
- breakingcups 12y agoIs it enough time to spin up a new instance though, if needed?
- tedchs 12y agoThat could be an interesting model if your web app is a single-page / static app served from Google Cloud Storage, with Javascript making AJAX calls to your backend and configured to gracefully handle transient errors as servers come and go.