OpenStack Swift is there a module to redirect client by region location?

Asked by Pierre Padrixe (stannie)

I am currently playing with OpenStack Swift, my expectation is to deploy a multi region cluster. For example one swift will be deployed in US and one in EU.

Is there a module or an option in swift-proxy to redirect client by region location?

If it is not possible, what other solutions do you suggest? Should I develop my own proxy server that redirects client to the nearest node (with geoloc/maxmind etc.)?


 - [Configuring a multi-region cluster][1]
 - [Proxy server configuration][2]


Question information

English Edit question
OpenStack Object Storage (swift) Edit question
No assignee Edit question
Solved by:
Pierre Padrixe (stannie)
Last query:
Last reply:
Revision history for this message
Samuel Merritt (torgomatic) said :

The blog post you linked is a bunch of proposed changes, not actual code. Code for geographically-distributed Swift clusters does not yet exist in the Git repository.

If you're deploying two separate Swift clusters, then you probably don't want to redirect based on location, or you'll confuse the heck out of people. If I upload a really important object to https://us-cluster/v1/a/c/o at work in San Francisco, and then travel to London, I expect to be able to get my object. If your middleware forces me over to https://eu-cluster/v1/a/c/o, then my data isn't there.

In answer to your actual question: no, there's no code in Swift to do that sort of redirection. You'll need to write a piece of WSGI middleware and stick it in the proxy server's middleware pipeline.

Revision history for this message
Pierre Padrixe (stannie) (pierre-padrixe) said :

Thanks Samuel for the precision. Then we have to use one region for the moment.

I didn't mean two swift clusters, but two "nodes" of the cluster (like it is specified in the article). Hence, the data would have been replicated from one node region to the other.