rendertron | A Headless Chrome rendering solution | Server Side Rendering library
kandi X-RAY | rendertron Summary
kandi X-RAY | rendertron Summary
Rendertron is a headless Chrome rendering solution designed to render & serialise web pages on the fly. Rendertron is designed to enable your Progressive Web App (PWA) to serve the correct content to any bot that doesn't render or execute JavaScript. Rendertron runs as a standalone HTTP server. Rendertron renders requested pages using Headless Chrome, auto-detecting when your PWA has completed loading and serializes the response back to the original request. To use Rendertron, your application configures middleware to determine whether to proxy a request to Rendertron. Rendertron is compatible with all client side technologies, including web components. A demo Rendertron service is available at It is not designed to be used as a production endpoint. You can use it, but there are no uptime guarantees.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of rendertron
rendertron Key Features
rendertron Examples and Code Snippets
Community Discussions
Trending Discussions on rendertron
QUESTION
In my first attempt at using Cloud to deploy an app...
The problem: GCP (Google Cloud Platform) unexpected instance hour usage (Frontend Instance Hours). High traffic was not the issue but for some reason a bunch of "instances" and "versions" were created by their autoscaling feature.
Solution they suggested: Disable autoscaling and stop serving previously deployed versions of your instance. I still need one version/instance running but through their console I still have not found where it shows how many versions/instances I have running or where to stop them (also verifying that at least 1 instance is still working in order to not break my app)
My app is simple app that was developed by Google developers and recommended by them for dynamic rendering a JS SPA (allows search engines and crawlers to see fully rendered html).
My actual website together with a node app to point to GCP for
crawlers is hosted else where (on Godaddy)
and both are working together nicely.
The app I deployed to GCP is called Rendertron (https://github.com/GoogleChrome/rendertron)
Google also recommends deploying to GCP (most documentation covers that form of deployment). I attempted deploying to my Godaddy shared hosting and it was not straight forward and easy to make work so I simply attempted creating a GCP project and tried deploying there. All worked great!
After deploying the app to GCP that has almost no traffic yet, I expected zero costs or at most something under a dollar.
Unfortunately, I received a bill for more than $150 for the month with approx the same projected for the next month.
Without paying an addition $150 for tech support, I was able to contact GCP billing over the phone and they are great in that they are willing to reimburse the charges but only after I resolve the problem myself.
They are generous with throwing a group of document links at you (common causes of unexpected instance hour usage) but can't help further than that.
After many google searches, reading through documentation, paying for and watching gcloud tutorials through pluralsight.com, the direction I have understood or not understood so far is as follows:
- almost all documentation, videos and tutorials talk about managing or turning off autoscaling using Compute Engine Instance Groups
- It is not clear that instance groups is not another hole I will fall into that is a paid service and I will be charged more than necessary
- Instance groups seems like overkill for a simple app that wants only one instance running at minimal cost
- there is not enough or difficult to find documentation for how to run a very small scale app at minimal cost using minimal resources
- I have not read or watched anything yet of how to simply use the config .yaml file (initially deployed) to make sure the app does not autoscale and also if I find that it seems like I still need to delete versions or instances that have already been started and it is not clear in how to do that as well.
- Instances and Versions are not clear on google console of how many are running, I still have not found on google console where there are multiple instances/versions running.
I can use a direction to continue my attempt of investigating how to resolve the issue.
The direction of me needing to create a Group Instance (so I can manage the no autoscaling from there) is the way to go and where I should focus my attempts?
The direction of continuing learning how to simply update my config in the .yaml file to create no scaling, for example something like setting both min_instances and max_instances to 1 together with learning how to manually stop (directly from GCP console) more than 1 instance/version that are currently running is where I should focus on?
A third option?
As a side note, autoscaling with GCP does not seem very intelligent.
Why would my app that has almost no traffic run into an issue that multiple instances were created?
Any insight will be greatly appreciated.
**** Update **** platform info
My app is deployed to Google App Engine (GAE) (deployed code, not a container)
Steps taken for Deploy:
...ANSWER
Answered 2021-May-03 at 16:44The rendertron repo suggests using App Engine standard (app.yaml) and so I assume that's what you're using.
If you are using App Engine standard then:
- you're not using Compute Engine [Instance Groups] as these resources are used by App Engine flexible (not standard);
- managing multiple deployments should not be an issue as standard does not charge (!?) for maintaining multiple, non-traffic-receiving versions and should automatically migrate traffic for you from the current version to the new version.
There are at least 2 critical variables with App Engine standard: the size of the App Engine instances you're using and the number of them:
- You may wish to use a (cheaper) instance class (link).
- You can
max_instances: 1
to limit the number of instances (link).
It appears your bandwidth use is low (and will be constrained by the above to a large extent) but bear this in mind too, as well as the fact that...
Your app is likely exposed on the public Internet and so could quite easily be consuming traffic from scrapers and other "actors" who stumble upon your endpoint and GET
it.
As you've seen, it's quite easy to over-consume (cloud-based) resources and face larger-than-anticipated bills. There are some controls in GCP that permit you to monitor (not necessarily quench) big bills (link).
The only real solution is to become as familiar as you can with the platform and how its resources are priced.
Update #1My preference is to use gcloud
(CLI) for managing services but I think your preference is the Console.
When you deploy an "app" to App Engine, it comprises >=1 services (default
). I've deployed the simplest, "Hello World!" app comprising a single default
service (Node.JS):
https://console.cloud.google.com/appengine/services?serviceId=default&project=[[YOUR-PROJECT-ID]]
I deployed it multiple (3) times as if I were evolving the app. On the "Versions" page, 3 versions are listed:
https://console.cloud.google.com/appengine/versions?serviceId=default&project=[[YOUR-PROJECT-ID]]
NOTE There are multiple versions stored on the platform but only the latest is serving (and 100% of) traffic. IIRC App Engine standard does not charge to store multiple versions.
I tweaked the configuration (app.yaml
) to specify instance_class
(F1
) and to limit max_instances: 1
:
app.yaml
:
QUESTION
I would like to use Rendertron for my NuxtJS site.
My nuxtjs firestore site is here at https://ampedcast.com and the rendertron site is here: https://render-tron.appspot.com/
According to this example given by google: https://codelabs.developers.google.com/codelabs/dynamic-rendering#4
I need to add these few lines below to server.js in my nuxtjs site https://ampedcast.com but I could not figure out how to do that. In nuxtjs, you are not supposed to make changes to server.js.
...ANSWER
Answered 2020-Dec-03 at 16:46I have not used NuxtJS myself but from the documentation it says:
Nuxt.js let you define the server connection variables for your application inside
nuxt.config.js
.
I am assuming you can configure your server settings there. You might also need a Custom API endpoint and add this part to it:
QUESTION
I have a scenario that Rendertron services need to run behind an HTTP proxy. I am not able to find the configuration that enables this setup.
Is it possible to achieve that?
...ANSWER
Answered 2020-Mar-18 at 19:57It seems there is no straight way to achieve it right now. What you can possible do is to change its source code until there is a new version of Rendertron that supports running it behind an HTTP proxy.
You can add an additional argument when launching the headless browser puppeteer as below, in src/rendertron.ts
And when starting Rendertron, be sure to pass in the environment variable RENDERTRON_HTTP_RPOXY
. See this open GitHub pull request for details.
It is also possible to specify puppeteer arguments in config, see another open GitHub pull request.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install rendertron
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page