Skip to content
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

port to AWS lambda or t2.nano #11

Closed
snarfed opened this issue Dec 15, 2015 · 5 comments
Closed

port to AWS lambda or t2.nano #11

snarfed opened this issue Dec 15, 2015 · 5 comments

Comments

@snarfed
Copy link
Owner

snarfed commented Dec 15, 2015

lambda docs. it'd be pretty nice to not have to run the EC2 instance, and it would cut our cost down a bit once our free tier year is up.

it would only cut our cost down by ~1/3, though. our bill is currently ~$17/mo, 90% of which is bandwidth, and our t2.micro will only add ~$9/mo.)

also, i'm not sure if lambda is ready for us yet. notably, there's a 5m request deadline and 512MB disk quota. i think most requests finish in <5m, but i'm not sure. i don't have good metrics on request latency. :/ and our output files are pretty much all <512MB, but i'm not sure how much more space the intermediate files take up.

an alternative is the new t2.nano instance type.

just collecting data here for now.

@snarfed snarfed changed the title port to AWS lambda? port to AWS lambda or t2.nano Dec 16, 2015
@snarfed
Copy link
Owner Author

snarfed commented Dec 17, 2015

t2.nano is looking like a pretty good candidate. its key characteristic is that it has low CPU quota ("credits"), but it can burst up to a full core for up to 72m. that's perfect for huffduff-video; actually transcoding the videos is CPU hungry when someone asks us to, but request volume is low and sparse. e.g. here's CPU for the last week:

screen shot 2015-12-17 at 1 42 24 pm

@snarfed
Copy link
Owner Author

snarfed commented Mar 25, 2016

CPU credit balance for last two weeks. ranges between 75 and 150.

screen shot 2016-03-24 at 6 02 26 pm

@snarfed
Copy link
Owner Author

snarfed commented Mar 25, 2016

based on that graph of our CPU credit balance over the last 2w, we tend to hang out between 79 (early 3/21) and 144 (the cap). t2-nano's cap is 72, ie half, so we should fit into that ok. CPU credit handling details.

t2-micro is $9/mo, t2-nano $4.50, ie $54/yr, or $38/yr reserved. pricing details.

@snarfed
Copy link
Owner Author

snarfed commented Mar 25, 2016

incidentally, we did 245GB outbound data transfer in jan, 240GB in feb, and we're on track to do 290GB in march. free quota is 15GB/mo, so losing that won't add much new cost.

@snarfed
Copy link
Owner Author

snarfed commented Mar 25, 2016

done! just waiting for DNS to propagate. updated the readme with some details.

@snarfed snarfed closed this as completed Mar 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant