Welcome everybody, this is a follow up to our post six months ago. We are very excited to give you an update and to announce the launch of version 2 of API2PDF, now in early access beta.
The documentation is available here.
Version 2 currently only has our Headless Chrome endpoint. We will be migrating our other endpoints (wkhtmltopdf, merge, zebra, libreoffice) in the coming months. Pricing is slightly different – We have removed the cost for bandwidth intake (only mb out is factored in), but increased the cost of computation time. For most customers, we imagine it’ll be a wash, but you may want to do some testing.
Pricing is $0.001 per mb generated + $0.00009551 per second of computation.
There is no change to the cost of v1.
Do I have to migrate from v1 to v2?
No, v1 will be maintained in coordination with v2 for the foreseeable future, but all new bells and whistles will be added to v2.
What’s New on Version 2?
Are there any updated SDKs for v2?
Not yet, just the REST API, no client SDKs. After all endpoints are migrated, we’ll work on the client libraries. But these rest calls are super easy.
Where do I report a bug or issue?
This is an early access beta for those who were itching for these new Headless Chrome features. If you run into a bug or problem with the API, please email firstname.lastname@example.org. Thanks!
What is the v2 Infrastructure?
Version 2 is not running AWS Lambda! We have done a lot of work on our docker container and AWS Lambda does not support the running of docker containers. They might one day. We looked into Azure and the technologies offered there.
Our first experimentation was with Azure Kubernetes and Azure Container Instances. Unfortunately it takes 45 seconds to spin up a new Azure Container Instance after it has detected that a scaling event is required. This is too slow for us. Api2Pdf has a strange scaling requirement in that it must handle “burst scale”. We might be cruising along at a nice 10 PDFs per second on average, but it needs to scale to handle 1000 PDFs in an instant and then go away. This is a little different than a traditional web application that has scaling events that grow over minutes.
Azure announced a new version of Azure Functions called Azure Premium Functions, which supports Docker Containers! We experimented with this last month and ultimately it does not scale fast enough at a reasonable cost to meet our needs.
What we really want is the best of both worlds. Run a docker container, but at AWS Lambda scale and pricing. Google has demonstrated they are committed to being a force in the Cloud Provider space. Turns out, they recently released a new product called Google Cloud Run that is exactly as we want. Run a container, priced and scales like AWS Lambda.
We migrated our Azure Function docker container to Google Cloud Run (that’s a blog post by itself) and that is where v2 is currently living today.
We look forward to your feedback!
Comments are closed.