From #350:
Hi Netlify,
My name is Mark, and I represent a popular open source project called Pok茅API (https://github.com/PokeAPI/pokeapi), an open RESTful API that has served over 400 million requests since inception. The goal of the project is to provide an API to support learners for educational purposes.
We are in the midst of looking for a new hosting platform, and I brought up Netlify, as it is a platform I already know and trust (and deploy my own sites on). I took a look at the pricing page (https://www.netlify.com/pricing/) and saw a reference about Vue.js and a free open source team plan (https://twitter.com/youyuxi/status/952220999877058561). Does Netlify still offer those, and if so, could we get more details about it, either via email or on https://github.com/PokeAPI/pokeapi/issues/350?
Thanks,
Mark
From Netlify, there are two things we need to do:
I have emailed Netlify back with our "yes", and will report back when I hear a response from them.
Thanks @neverendingqs! Keep us up-to-date on whether they still offer the OSS team plan :)
I've used Ditto to do a rough bandwidth estimation for the API:
There are ~9500 objects:
sargunv@castle ~/Projects/ditto fd json ./data | wc -l
9428
All objects combined are ~309 MiB:
sargunv@castle ~/Projects/ditto fd json ./data | xargs cat | pv -b > /dev/null
309MiB
Assuming each file has an equal chance of being requested (likely a bad assumption) at 100K requests/day, that's ~3.5 GiB per day or 97 GiB/month:
That puts us right around the Netlify limit of 100GB/month.
Now, according to phalt the real request rate is about 1/3 to 1/2 that amount, so I think we'll likely be fine, but since we're less than an order of magnitude out from the limit I think it's worth keeping the limit in mind. This is highly dependent on the average file requested.
One bandaid is to add a --minify option to ditto clone. Roughly half of the bytes are spaces (but not all of those spaces would be minified):
sargunv@castle ~/Projects/ditto fd json ./data | xargs cat | tr -cd ' ' | pv -b > /dev/null
156MiB
Netlify should automatically gzip compress it too, which will probably cut the actual request size in half. Removing spaces doesn't really do much when gzip is compressing it anyway. In any case, it's probably good to keep the JSON responses human readable.
Ah, good point. If Netlify is compressing then minify is unnecessary.
I don鈥檛 know anything about Netlify鈥檚 CDN layer, but if we add Cloudflare in front of it we can likely save even more. Our responses are all highly cacheable.
Nice work on the bandwidth estimation though - that is good to know!
Sounds good; Cloudflare caching would make bandwidth limits on Netlify essentially irrelevant.
Based on the example at https://github.com/PokeAPI/pokeapi/issues/356#issuecomment-419611875, it looks like it is getting gzip-ed.
Not sure about how Netlify's caching layer applies to their limits. They may include cache hits as it still costs them. I can follow-up.
We are now set up! I have reached out to @PokeAPI/contributors in a separate thread to get access. Please make any requests there.
Most helpful comment
Based on the example at https://github.com/PokeAPI/pokeapi/issues/356#issuecomment-419611875, it looks like it is getting gzip-ed.
Not sure about how Netlify's caching layer applies to their limits. They may include cache hits as it still costs them. I can follow-up.