HerokuRandall DeggesProblem & solution
Scaling ipify to 30 Billion Requests and Beyond on Heroku
Summary
ipify began as a free API that returns a caller’s public-facing IP address, created to help discover cloud instances’ external addresses without management APIs. Its initial implementation was a sub-50-Loc Node service deployed on one Heroku dyno for about $7/month; rising usage caused slow responses and 503s. Investigation showed roughly 10 rps, while one Node process and string manipulation around X-Forwarded-For limited throughput; clustering doubled capacity, and the implementation later used Go. Heroku supplied load balancing, automatic restarts, and horizontal dyno scaling as traffic expanded through bursty demand and malicious use; the operator chose manual capacity rather than paid autoscaling. The service surpassed 30B requests per month, routinely serving 2k–20k RPS with 1–20ms average response times at $150–$200 monthly; ownership later passed to whoisxmlapi.com, whose work includes an improved UI and more data endpoint.
Context
The service was created because existing public IP lookup options were unsuitable: some required scraping websites, charged fees, imposed lookup limits, failed unpredictably, or appeared to run on a single server. Later, growing traffic caused slow responses, 503 errors, and burst-capacity challenges.
Approach / What changed
ipify used a small Node.js API on Heroku, then added Node clustering and later used Go after profiling exposed throughput limits related to string manipulation. Heroku load balancing, automatic restarts, and additional dynos handled scaling; burst traffic was addressed with manually provisioned capacity rather than a paid autoscaling service.
Takeaways
A single Node process limited throughput, while using the Node cluster module to run one process per CPU core immediately doubled capacity on the Heroku dynos.
The service routinely handled 2k–20k requests per second and more than 30 billion requests per month, with average response times ranging from 1 to 20 milliseconds.
At a monthly cost of roughly $150–$200, ipify’s hosting cost was reported as $0.000000007 per request; the operator noted that serverless or functions-as-a-service deployment would cost thousands monthly.
Source and freshness
- Source
- heroku.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.