Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have Replicated Gluster Storage which is used by Auto scaling Servers. Both, Auto scaling and Storage are allocated in two Availability zones.


Number of Bricks: 4 x 2 = 8
Transport-type: tcp
Brick1: gluster01:/storage/1a # Zone A
Brick2: gluster02:/storage/1b # Zone B
Brick3: gluster03:/storage/2a # Zone A
Brick4: gluster04:/storage/2b # Zone B
Brick5: gluster01:/storage/3a # Zone A
Brick6: gluster02:/storage/3b # Zone B
Brick7: gluster03:/storage/4a # Zone A
Brick8: gluster04:/storage/4b # Zone B

I used Round Robin DNS for Gluster entry point, so DNS name resolves to all of the storage server addresses which are returned in different order all the time:

# host has address xx.xx.xx.x1 has address xx.xx.xx.x2 has address xx.xx.xx.x3 has address xx.xx.xx.x4

The Storage is mounted with Native Gluster Client:

# grep storage /etc/fstab /storage glusterfs defaults,log-level=WARNING,log-file=/var/log/gluster.log 0 0

I have heard Gluster might be mounted with the first Server IP and after that it will fetch its configuration with the rest of Servers. Personally, I never tested single Server mount setup and I don't know how Gluster handles this.

On EC2, traffic among single Availability zone is free and between different zones is not. When Client in zone A writes to storage and IP of Storage in zone B is returned, it will cost me twice more for data transfer: Client (Zone A) -> Storage Server (Zone B) -> Replication to Storage Server (Zone A).

Question: Would it be better to mount Storage Server of the same zone, so that data transfer charges apply only for replication (A -> A -> B)?

share|improve this question
up vote 2 down vote accepted

Doing the mount to a server in the same zone will save the initial gluster session setup traffic from traversing the paid links. However, it won't do anything to force data traffic to the local AZ. Gluster distributed-replicated volumes such as yours consider all bricks to be equal. This means that it can put files in unpredictable places; it is entirely possible that the two replicas are in the same AZ, at which point all access to that file from the other AZ will traverse the metered link. Since both replicas are in the other AZ, you'll get charged twice the network transfer due to how Gluster handles replication.

The only place that Gluster has any sense of site-awareness is in their Geo-Replication module. Which is sadly asynchronous.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.