top | item 11753693

(no title)

goldbrick | 9 years ago

> ~15 million API calls per day

Isn't that horrifically expensive?

discuss

order

southpolesteve|9 years ago

Define horrific. The traffic that generates those calls also generates lots of revenue :) It is also extremely spikey. This is a big win for Lambda since we are only pay for what we need and don't have to worry about scaling EC2 up and down to meet demand.

I have one hard example I can share. We had a node service that was running on ec2 and cost ~$2500/mo. Moved the code directly over to lambda. Now ~$400/mo.

Quantifying other costs is a bit harder but do you have a DevOps person on your team? Or multiple people? How much do they get paid?

Fenntrek|9 years ago

Guessing they use API gateway so that's:

$3.50(cost per million calls)*15 = $52.50

Lambda is pretty cheap.

For example a 256 memory function running for 300ms being called 15,000,000 times would cost 21.77.

All together that's $74 a day for just lambda and API gateway without any extras (cache, bandwidth pricing etc).

Maybe more expensive that raw infrastructure but it's a pretty inconsequential amount of money per day for close to no ops.

jamiesonbecker|9 years ago

So, $2,257/mo for 15Mreq/day ≈ 174req/sec

Practically any smaller instance type (i.e. m3.medium) can handle this small of a load all by itself, without even breaking a sweat.. and instead of paying $74 per day, it would cost less than $74 per month.

In fact, ELB + an ASG of three t2.micro's running continuously would cost around $49 per month, not per day, and possibly around the same amount of effort (or less) to create/maintain/manage.

It's somewhat apples and oranges, but there's no doubt that lambda is expensive compared to plain old EC2, and that cost disparity increases linearly with scale.