Why the BufferedHttpResponse stops proceeding requests?

asked 2015-03-05 13:59:20 -0600

Gayana gravatar image

updated 2015-03-06 07:16:30 -0600

I am doing a modification to the previous question I asked because when I dug deeper I could find out where the request waits. I am testing swift by generating synthetic latency inside PUT method of obj/server.py.

My system consists with 5 storage nodes and 1 proxy. I am using replication degree 5 and have the write quorum 1 and read quorum 5 for strong consistency because it is a requirement of my test.

Then I inserted a synthetic latency (a while loop to check for primes just 2-3 seconds) only in one of the storage nodes. What I expected to see is that the final result would not get any impact because only one correct response is enough to success a write.

Even though the proxy check for write quorum and break with only 1 correct response, when it initiate the second write request it waits at self._read_status() in the below function in common/bufferedhttp.py

def expect_response(self):
if self.fp:
    self.fp = None
self.fp = self.sock.makefile('rb', 0)
version, status, reason = self._read_status()

if status != CONTINUE:
    self._read_status = lambda: (version, status, reason)
    self.status = status
    self.reason = reason.strip()
    self.version = 11
    self.msg = HTTPMessage(self.fp, 0)
    self.msg.fp = None

This happens I guess, because previous request is still in the PUT method due to the synthetic delay I added.

But I am confused. Is it the expected behaviour?

Why does not it allow to proceed?

What do the BufferedHttpConnection and BufferedHttpResponse do?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-03-16 09:39:41 -0600

Gayana gravatar image

Finally understood the reason.

Its because of the "Workers " configuration in all Account/Container/Object config was set to 1

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-03-05 13:59:20 -0600

Seen: 519 times

Last updated: Mar 16 '15