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

asked 2012-11-14 15:38:48 -0500

pierre-padrixe gravatar image

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)
  • (Proxy server configuration)
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2012-11-14 19:24:43 -0500

torgomatic gravatar image

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.

edit flag offensive delete link more

answered 2012-11-14 23:01:57 -0500

pierre-padrixe gravatar image

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.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2012-11-14 15:38:48 -0500

Seen: 177 times

Last updated: Nov 14 '12