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

Asked by Pierre Padrixe (stannie) on 2012-11-14

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.)?

Resources:

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

  [1]: http://www.mirantis.com/blog/configuring-multi-region-cluster-openstack-swift/
  [2]: http://docs.openstack.org/trunk/openstack-object-storage/admin/content/proxy-server-configuration.html

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Solved by:
Pierre Padrixe (stannie)
Solved:
2012-11-14
Last query:
2012-11-14
Last reply:
2012-11-14
Samuel Merritt (torgomatic) said : #1

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.

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.