TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How Ipdata Serves 25M API Calls from 10 Global Endpoints for $150 a Month

67 pointsby jonathan-kosgeiabout 7 years ago

5 comments

orfabout 7 years ago
Interesting read, thanks for posting, but I think you can do better. I&#x27;ve been playing with Fastly and VCL recently and you could write your whole app in VCL and have it served right from the CDN. 25 million requests would cost about $20 for that. If you include the API keys in the log output and batch-process that each day&#x2F;hour&#x2F;whatever to keep usage stats, that would remove the need for Dynamo? You&#x27;d then keep a table of banned API keys and update that through the Fastly API dynamically.<p>Just a thought. Still, $150 p&#x2F;m is not bad!
评论 #16746602 未加载
评论 #16746318 未加载
seanp2k2about 7 years ago
That does seem good, but when you consider that it’s basically just doing a DB query for an IP (and there might be a clever way to store CIDRs where the DB finds it within a range) + authentication, authorization, and accounting ( AAA), it becomes a bit less impressive. I’m guessing again that the AAA stuff is actually more work than the actual lookups. I’ve made some services which use geoip before with in-memory lookups. Since it doesn’t change that frequently, aside from AAA, you don’t really need an external DB at all — just have the actual executable contain the lookup info, now you’re down to just lambda. Actually, don’t even build a service — just distribute a binary with the tables inside, so then customers don’t even need to make a call, wait, and pay for each call. Consider how well <i>that</i> would scale (and indeed this is already the business model for some of the MaxMind products (e.g. <a href="https:&#x2F;&#x2F;www.maxmind.com&#x2F;en&#x2F;geoip2-city" rel="nofollow">https:&#x2F;&#x2F;www.maxmind.com&#x2F;en&#x2F;geoip2-city</a> ), but it doesn’t make for as interesting of an article.
评论 #16746399 未加载
评论 #16750495 未加载
评论 #16746282 未加载
sandGorgonabout 7 years ago
super cool article!<p>I do wonder if you didnt try Apistar (<a href="https:&#x2F;&#x2F;github.com&#x2F;encode&#x2F;apistar" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;encode&#x2F;apistar</a>) . Its built by the author of django rest framework .and also is much more frequently updated
评论 #16746811 未加载
评论 #16745846 未加载
samwillisabout 7 years ago
Out of interest where did you get the regional data for IP addresses from? Did you collect it yourself, if so how? There seem to be very few sources that allow you to resell it.
评论 #16746705 未加载
xstartupabout 7 years ago
Why not push to Kinesis directly in a background worker?<p>I understand printing log is simple but you still have to push that log to cloudwatch... it&#x27;s still being done on the same system. So, you end up paying that cost either way.<p>You can use MongoDB atlas with multi-region replication for low latency queries instead of DynamoDB.