nbinteract
nbinteract copied to clipboard
Operation cost estimation
At some point, we'd like to run our own BinderHub so we won't have to worry about overloading the mybinder.org servers. How much will this cost?
Suppose we want to use Google Cloud (pricing). If we can fit 4 people per
n1-standard-1
machine (1 CPU, 3.75GB RAM), this costs us $6 per notebook
server per month if we assume each server runs non-stop for the entire month. 4
people per CPU seems reasonable since CPU workloads are very bursty (usually
one complete notebook run, plus interactions afterwards).
My guess is that we'll get a mix of regular usage from textbooks and bursty usage from blog posts. Let's analyze these costs separately.
Data 100 has 650 students in Spring 2018. About 200 students have used the textbook at least once and we're getting an average of 10 users per hour during 9am-midnight. If each user starts a Binder server, this comes out to about $75 a month including overhead for running JupyterHub. This will be the most predictable cost for us in the short term.
If someone makes a blog post that requests a thousand servers for 24 hours straight, this will cost us about $200 to handle. If bursts of activity like this happen twice a month this comes out to $400 per month.
This gives us a total operating cost of around $500 a month if we assume nbinteract gets pretty popular. It's not too hard to put a cap on the monthly cost since we can deny server requests once we're full; I think a cap of $1000 a month sounds like reasonable place to start.