30 karma · joined Nov 20, 2018 (8y ago) · 17 submissions
comment 7y ago · link · parent
It's all about using the chrome-devtools-protocol, if you are interested, you may want to read about it in https://chromedevtools.github.io/devtools-protocol/1-2
>If the “initial render” of client side code involves JavaScript mounting nodes on the DOM
That's the raison d'être of rendora, if your website doesn't add DOM nodes using some javascript framework (e.g. React, Vue, etc..)in client, basically the HTML will be exactly the same and thus you don't need rendora in that case
comment 7y ago · link · parent
comment 7y ago · link · parent
no, it returns the whole page, it's just equivalent to rendering pages on your browser, everything in the initial HTML is the same in addition to HTML generated by javascript frameworks added to the DOM after the webapp scripts are loaded.
comment 7y ago · link · parent
I am not aware of any. You just don't use headless Chrome for typical browsing :D
>Is headless chrome faster?
I guess it slightly is, because it doesn't need to paint the rendered page but tbh Chrome/Chromium is an enormous project so I can't comment in details.
>Can we control popup windows in headless one? >Does it support proxies?
I believe they are not possible because chrome-devtools-protocol doesn't support that yet, but you can add http/socks proxies inside Chrome and then run it as headless to use a proxy if you insist
> Is it possible to control tabs? yes
if you're that interested about headless Chrome, I recommend you read about chrome devtools protocol https://chromedevtools.github.io/devtools-protocol/1-2
comment 7y ago · link · parent
comment 7y ago · link · parent
* prerender.io needs additional code in your backend to filter requests and asks for SSR from a remote server then returns back the resulting HTML; Rendora doesn't because it does all that automatically by being a lightweight reverse HTTP proxy server in front of your backend
* with Rendora you can control caching (using an internal local store or Redis), prerender.io claims caching on their servers I guess but then you can't control it espcially if you have fast chaing pages
* Rendora provides Prometheus metrics to measure your SSR latencies, count of cached and uncached requests and an API rendering endpoint
* Rendora supports asynchronous pages where content is loaded after the initial DOM load
* you can simply choose which Chrome version you want to use with Rendora
* Rendora instructs headless Chrome to skip fetching unncessary assets (e.g. fonts, CSS, images, etc...) which makes the DOM load much faster then when loaded and rendered by default
comment 7y ago · link · parent
comment 7y ago · link · parent
>was wondering if there is any other existing product in the market
yes, there is rendertron; here is the comparison between rendora and rendertron and why I think rendora is better https://github.com/rendora/rendora#what-is-the-difference-be...
also there is prerender.io but this is a commercial paid product and also needs change in your backend; and I guess they didn't use headless Chrome until recently
>Wish the crawlers incorporate something like this into their crawling logic so that we really don't need to worry about server rendering anymore
Except for Google, probably all other search engines don't even execute javascript to render pages (Bing claimed to be rendering js very recently but I haven't seen it in my production website :D), they claim that the web is too big and the computational complexity of executing javascript in every page is unreasonable. Even Google can't render pages correctly if you have asynchronous content from my own experience.
comment 7y ago · link · parent
I also added Prometheus metrics and a rendering API endpoint so that you can get an SSR latency histograms with buckets 50ms, 100ms, ..., 500ms and see the avg latencies for your use case.
TLDR; headless Chrome is actually faster than you might initially think. It might be 200-300ms at maximum to get the initial DOM load assuming that you have complex enough pages.
13.
Show HN: Rendora – Dynamic server-side rendering for modern JavaScript websites(github.com ↗)
36 points · by geo_mer · 7y ago · 22 comments
comment 8y ago · link · parent
1. rolling updates
2. decoupling configs and secrets from code and mounting/changing config files easily
3. robust and predictable testing/production environments
4. centralized logging
Also microservices's goal isn't really about just "scaling" in my opinion, there are other important advantages even if you have no intention to scale, aspects like modularity, separation of concerns, robustness and lowering the technical debt are still as important whether your app serves 1 or a 10000 users at the same time. Of course you can pull your python app from your repo or even rsync it (just like you can just develop any software without using git or any revision control) and just execute it might work very well, but sooner or later you are going to regret it if you're a business