OpCode
February 23, 2021, 12:58pm
1
Hi yall,
i am trying to replace the nginx with an AWS ALB.
The only thing that is missing for me is the regex for relay
→ ^/api/[1-9]\d*/
wich endpoints in particular would be covered by this pattern for relay ? , so far i thought that it is only calling /api/store
Thanks in advance !
The intent is to cover all API endpoints starting with /api/
that are NOT /api/0/
. All of those are owned by Relay. There are multiple of them, I don’t recommend encoding them into the lb
1 Like
OpCode
February 23, 2021, 3:41pm
3
That was it.
On the AWS LB i explicitly made a rule just for web /api/0* and weighted it way higher then relay.
Thx a lot again !
Is there a list of which URL should be covered by which endpoint ?
I’m trying to use the AWS ALB too and the regex in the Helm charts does not work with ALB (path apparently does not support regex ).
So far, I see :
/api/0/*
for web
/api/*
for relay
/*
for web
Is that right ?
1 Like
Yeah, that’s pretty much what I said.
OpCode
February 24, 2021, 12:43pm
6
Important
Change the evaluation priority for the Web Rule to a higher value then that of relay, otherwise it can happen that your request that was meant to go to /api/0/* goes to /api/*
Good, I just wanted to spell it out to avoid confusion and to be exhaustive.
FYI, I changed locally my Ingress definition to:
rules:
- host: my.sentry.io
http:
paths:
- backend: # To redirect HTTP to HTTPS
serviceName: ssl-redirect
servicePort: use-annotation
path: /*
- backend:
serviceName: sentry-web
servicePort: 9000
path: /api/0/*
- backend:
serviceName: sentry-relay
servicePort: 3000
path: /api/*
- backend:
serviceName: sentry-web
servicePort: 9000
path: /*
and the service seems to be working.
1 Like
BYK
March 4, 2021, 6:55pm
8
Just FYI for you and anyone that may come to this thread, we do not recommend switching out the built-in Nginx with something else but instead put an LB in front of it.
See https://develop.sentry.dev/self-hosted/#productionalizing (will add this note there too)
system
Closed
March 19, 2021, 6:56pm
9
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.