Hey everybody,
After reading trough the announcement blogpost and the RFC discussion about On-demand builders i understand it’s mechanics and the reasoning behind it.
Where i struggle is it’s position in Netlify’s request lifecycle, more specically if i have a _redirect
file and an egde handler plus an on-demand builder function, all acting at the same url, then what is the order of the execution each of these components?
A good example might be:
I have a bookstore website with multiple language support, and edge handler can take care of serving the german content to a browser visiting from Germany, but then I have also books wich are less popular, so i can have an on-demand builder to build those book pages only when they are visited. On top of that i have a _redirects
file in which redirects from an old book url to this new url, where i have the geolocation using edge handlers, and certain book urls are generated on-demand?
Is this the order of execution, when user visits an old book link?
-
_redirect
rule gets triggered, user gets navigated from the old url to the new book url - edge handler gets triggered user gets navigates to the german version of the site, still on new book url
- On-demand builder gets triggered, since this is as rarely visited book, the page gets generated on demand
- User sees the book page, in german.
Also if anybody can point me the right direction about Netlify request flow (request comes in response gets out), i was hoping to have a clear overview on what is actually happens during request processing. I was going trough the docs but nothing seemed to explain this.