How to throttle Angular Universal when rendering hundreds of pages

Viewed 71

I'm prerendering an angular site with 250+ blog posts, listed and included in the render by --routesFile routes.txt

Problem is when angular prerenders it blasts the network and my backend server with hundreds of network requests at the same time. This overloads my server which drops some requests resulting in Http failure response for <https://my_backend/>: 0 Unknown Error

Is there any way to throttle or slow down the prerender? It's a bit aggressive. I'm looking into improving the handling on the server-side.

Edit

Using the latest angular at time of writing: 11.0.1.

I didn't seem to have this problem with angular 10.

Also, I have been able to identify and eliminate the concurrent write issues with my Golang backend, which is now handling the requests fine.

Would still like to know if throttling the Angular prerender is possible.

0 Answers
Related