Conversation
|
Could the REST server return a header with the new array's region, in order to avoid hitting the global endpoint a second time? |
I thought that's what's happening in fact. There's a "location" header where we read some URI from, I am trying to understand what the REST Server puts in there so that I can answer to you and so that I can decide if this fix is actually not needed. I'll let you know when I have the answers. |
@teo-tsirpanis To clarify, the requests hit a redirect server before the REST server which sends a Temporary Redirect message to the client with a Location header, and that's where we get the region from and store it in the cache. It's just that upon array creation the redirect server doesn't know the region yet, so it sends back the default. We shouldn't be caching that one, but ones of subsequent requests. That's what's being fixed here. |
|
I see, thanks. In the future we could make the create array REST API return status code 201 with the region-specific endpoint in the |
Currently we store a cache of the region redirection for all requests to the REST server in
redirect_uri_map. However, when an array is first created, we don't know the region yet and we sent the request to the default region, so we shouldn't be caching this. After the array has been created, subsequent requests will be redirected by the server to the right region, and only then the rest client in Core should start caching inredirect_uri_map.[sc-50254]
TYPE: IMPROVEMENT
DESC: Skip caching redirect uri on array create