[Openstack] question about X-Timestamp header

Michael Barton mike-launchpad at weirdlooking.com
Tue Nov 29 05:44:44 UTC 2011


On Mon, Nov 28, 2011 at 9:04 PM, pf shineyear <shinepf at gmail.com> wrote:
> hi all
> i think X-Timestamp header is come from the proxy servery to object storage
> node, the value is proxy server current time.
> if i have 2 or more proxy server run in one cluster, should i comfirm same
> "account/container/filename" use same proxy server?
> because if i upload one file 2 times use different proxy server, the server
> time is different, and i think there maybe have some consistent problem if i
> do so. am i right??

Yeah, Swift's "last write wins" logic is only as good as proxy server
times are synchronized.  The idea is you'd use NTP or similar to keep
them synced.

And NTP generally does a really good job, with clock skews an order of
magnitude smaller than the time it takes to PUT an object into Swift
(which is about the best conflict resolution level you could hope for
anyways).

We talked a lot about using logical clocks (e.g. vector clocks) when
designing Swift, but realistically they'd probably usually just have
to fall back on timestamps to resolve conflicts.  Or version objects
when there's a conflict and let the client decide which is "right",
and that's a whole mess for both the clients and the backend.

We've also talked about tie breaker ideas, because there's only so
much resolution in those timestamps.  But in reality, it's a pretty
low priority because it's really difficult to exploit and only screws
up the user's own data if they manage it.

- Mike




More information about the Openstack mailing list