-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Routing jobs by something other than path #282
Comments
Path rewriting breaks front-end appsHere's a detailed explanation why the problem exists due to path rewriting. It is common to many front-end apps, like Drupal, WordPress or pgAdmin.
Note that while the issue occurs in almost any kind of front-end apps, there are exceptions (like Sphinx or HUGO) that are "proxy-friendly" and work well thanks to using relative paths inside its HTML/JS contents. |
In general, to address this issue, we need to find a way of putting additional information to HTTP request that allows Racetrack to distinguish a job, and dispatch the request to appropriate place. HTTP request looks usually like this:
Possible options:
|
Currently, the best way I see is to go with hostname subdomains.
|
Routing jobs by the path can be painful and harmful. Here's why:
For instance, if we were about to deploy WordPress to Racetrack, we'd need to deploy it at the non-root path, ie.
/pub/job/wordpress-job/0.0.2/
. This is required by Racetrack due to path routing done by PUB.However, WordPress doesn't seem to work with the non-root base path (or at least I wasn't able to achieve it).
This is not about just the WordPress. Drupal commits the same sin. I was finally able to deploy it to Racetrack by doing some weird HTML output rewriting, which is unreliable and can't be generalized.
Furthermore, jobs can be accessed either by its exact version
/pub/job/adder/0.0.2/
, alias/pub/job/adder/latest/
or a wildcard/pub/job/adder/0.0.x/
so what we really need is to serve a job at wildcarded/pub/job/adder/*/
URL path. Again, this is not supported by common applications.The only cure I see is not to do path routing at all. Instead jobs could be routed by hostname.
That is: hostname
adder-0-0-2.pub.dev-racetrack-cluster.example.com/
, which is a part of HTTP request, could be parsed by PUB.I know it requires a lot of effort to be done by the infrastructure providers (k8s ingress, wildcarded HTTPS certificates) and local testing might become more complex with the addition of a local DNS server. However, Racetrack would become wide open to nearly any kind of application.
(This is not urgent, it's rather nice-to-have feature)
The text was updated successfully, but these errors were encountered: