Live data from Hacker News

URL to PDF Microservice

github.com

1–10 of 95 posts

Re: URL to PDF Microservice

#2
I wonder how scalable the service is...

At least with PhantomJS I felt like my system would begin to lockup if there were too many instances rendering at the same time (and it didn't appear to be an issue of too little memory).

Nonetheless, this looks promising.

Re: URL to PDF Microservice

#4
post #2

I wonder how scalable the service is... At least with PhantomJS I felt like my system would begin to lockup if there were too many instances rendering at the same time (and it didn't appear to be an issue of too little memory). Nonetheless, this looks promising.

Web rendering is hard. You'll probably have to scale horizontally at some point, and balance load between servers. But a microservice architecture makes this not terrible.

Re: URL to PDF Microservice

#5
post #2

I wonder how scalable the service is... At least with PhantomJS I felt like my system would begin to lockup if there were too many instances rendering at the same time (and it didn't appear to be an issue of too little memory). Nonetheless, this looks promising.

It's using headless chrome, and there is a serverless version of chrome headless (chromeless), so it should be pretty scalable.

Re: URL to PDF Microservice

#6
Unfortunately, the "sensible defaults" don't seem to check input URLs correctly and allow file:// URLs.

Just try ?url=file:///etc/passwd on the demo instance.

That seems to be a quite common issue with services like this built on generic libraries.

Re: URL to PDF Microservice

#8
post #5
post #2

I wonder how scalable the service is... At least with PhantomJS I felt like my system would begin to lockup if there were too many instances rendering at the same time (and it didn't appear to be an issue of too little memory). Nonetheless, this looks promising.

It's using headless chrome, and there is a serverless version of chrome headless (chromeless), so it should be pretty scalable.

A chrome is a chrome... headless chrome uses almost the same resources as a desktop chrome (same engine and all that)

Re: URL to PDF Microservice

#10
post #2

I wonder how scalable the service is... At least with PhantomJS I felt like my system would begin to lockup if there were too many instances rendering at the same time (and it didn't appear to be an issue of too little memory). Nonetheless, this looks promising.

You need to fire a new chrome headless process every time you create a PDF, its not scalable but it works.

I wonder if this part of chrome could be easily extracted as a C++ library.

Post reply on HN