[Openstack] [Swift] GET request nodes and handoffs

Shrinand Javadekar shrinand at maginatics.com
Wed Jul 13 19:18:51 UTC 2016


Hi,

I am trying to understand the mechanism used by Swift to determine
which storage node to send a GET request to.

I have a single node setup with 4 disks: r1, r2, r3 and r4. For a
given container and object-name, the swift-get-nodes -a output shows
the following:

Server:Port Device 127.0.0.1:6000 r2
Server:Port Device 127.0.0.1:6000 r4  [Handoff]
Server:Port Device 127.0.0.1:6000 r3  [Handoff]
Server:Port Device 127.0.0.1:6000 r1  [Handoff]

I confirmed that the object got written into r2 correctly.

However, sometimes, when I read the object, the request is first sent
for the handoff nodes. Below is an except of the log that shows that
the request was sent to r3 and r1 which returned 404. Then, when the
user/client tried again, the request was sent correctly to r2 which
correctly returned HTTP 200.

http://pastie.org/private/rap4w6gkgcor8gt4wkqoa

Clients/users are going to have limited retries. So, if the situation
that happened in the first case happens multiple times, clients will
believe that the data is lost, right?

What causes GET requests to directly be sent to handoff nodes without
being sent to the primary node first?

Thanks in advance.
-Shri




More information about the Openstack mailing list