-
-
Notifications
You must be signed in to change notification settings - Fork 384
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
chore: have two apache servers #10766
base: main
Are you sure you want to change the base?
Conversation
conf/nginx/sites-available/off
Outdated
default 8005; | ||
|
||
# home pages | ||
"~*GET/$" 8004; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should handle also the HEAD and OPTIONS methods (used by browsers for CORS)
conf/nginx/sites-available/off
Outdated
"~*POST/cgi/product.pl" 8004; | ||
# product API read / write | ||
"~*GET/api/v./product/" 8004; | ||
"~*POST/api/v./product/" 8004; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For API v3, we use the PATCH method too
conf/nginx/sites-available/off
Outdated
@@ -13,6 +13,21 @@ server { | |||
} | |||
} | |||
|
|||
# map to decide if we go to the main (8004) or secondary service (8005) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"secondary" sounds like it's not a priority. I almost expected that we would send slow requests that we care a bit less about to the "secondary" Apache.
I think it would be clearer to use a name that gives the intent, like "fasttrack" or "fastlane".
env/env.obf.main
Outdated
@@ -0,0 +1,3 @@ | |||
# This is used by ports.conf in apache2 | |||
APACHE_ARGUMENTS=-D APACHE2_PORT=8002 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we are changing those files, could we use the same port numbers for all flavors? We don't run them in the same server anymore, so we could just use 8001 (and 8002 if there's a fast track Apache) for all flavors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thank you.
I added a few comments, I think we should at least add the HEAD/OPTIONS/PATCH methods (or maybe just remove the method altogether, I can't think of a case where we would want to send a request to different Apache servers based on the method)
Also unify port number to 8001
Quality Gate passedIssues Measures |
See openfoodfacts/openfoodfacts-infrastructure#399
Part of: