The last discussion point from this article very much so rings true for me, too. It's been how many years since the Spanner paper and I still can't get a GCP VM with atomic clocks? At least now I can provision Cloud Spanner as a managed service, but is this the future of clouds keeping their services at an advantage?
I think the reality is making the SLA guarantees that Spanner in a third party cloud is just... not very practical.
The end of a myth: Distributed transactions can scale
41–50 of 95 posts
Re: The end of a myth: Distributed transactions can scale
#42Earlier quoted context omitted.
Time synchronization over a network with unknown latency characteristics is fundamentally impossible.
Really? It is now Tuesday in central europe and I guess most machines¹ managed to figure out that fact. Most machines will also know it is 8:11. The question is how much resolution do you need and are your clocks accuratly synced enough for the thing you plan to do. You are aware that many of the physics experiments that operate at the edge of what is possible use extremely accurate clocks synced over national and so…
Fairly certain distributed physics experiments will be using atomic clocks that are not synchronized over the network. And/or they'll use direct satellite or GPS time sources which have predictable latencies.
Re: The end of a myth: Distributed transactions can scale
#43Earlier quoted context omitted.
Time synchronization over a network with unknown latency characteristics is fundamentally impossible.
Wow. It’s a wonder anyone has a correct time then. /s Sarcasm aside, their NTP servers are less than 2 hops from my router. I know that because of excellent tools like ping and trace route.
With a correctly equipped and configured PTP installation locally, you can expect your clocks to be synchronized on the order of a very small number of microseconds with respect to each other, but the relationship between those and the atomic global clock is something else.
If you are using satellite/GPS time sources, then that's another matter. Why then is it relevant to have an NTP hookup at your ISP?
Re: The end of a myth: Distributed transactions can scale
#44Earlier quoted context omitted.
Wow. It’s a wonder anyone has a correct time then. /s Sarcasm aside, their NTP servers are less than 2 hops from my router. I know that because of excellent tools like ping and trace route.
Based on your other post, it sounds like you are doing NTP with your ISP and then using PTP to sync your servers on the local network. Nothing about this implies that you are accurate to the global clock within a microsecond, let alone accurate within any number of nanoseconds. With a correctly equipped and configured PTP installation locally, you can expect your clocks to be synchronized on the order of a very small…
Also, consistency and accuracy are orthogonal to each other. My servers clocks are consistent and fairly accurate in regards to global time.
Re: The end of a myth: Distributed transactions can scale
#45Earlier quoted context omitted.
Based on your other post, it sounds like you are doing NTP with your ISP and then using PTP to sync your servers on the local network. Nothing about this implies that you are accurate to the global clock within a microsecond, let alone accurate within any number of nanoseconds. With a correctly equipped and configured PTP installation locally, you can expect your clocks to be synchronized on the order of a very small…
With A ISP, not my ISP. Also, I’m syncing with a Stratum 0 servers which are connected to an atomic clock and several GPS clocks. Also, consistency and accuracy are orthogonal to each other. My servers clocks are consistent and fairly accurate in regards to global time.
Re: The end of a myth: Distributed transactions can scale
#46I implemented multiversion concurrency control in Java with threads but I want to raise it to multimachine.
The problem I have is that the read and write timestamps need to be available to detect if a transaction between machines conflicts.
How do I synchronize read and write timestamps with minimal latency?
When a database replica receives a transaction for key X, it needs (a) a timestamp that is globally accurate (b) needs to tell other replicas about it so they can detect dangerous read-write dependencies.
I feel it inherently requires serialisation of timestamps to accurately determine what other nodes are doing with data.
Otherwise you get dangerous read-write skew.
(See the whitepaper "Serializable Snapshot Isolation")
Load balancers don't do much work, except shift traffic. I wonder if a load balancer that collects timestamps and enriches requests with timestamp information would be a scalable solution?
Re: The end of a myth: Distributed transactions can scale
#47Earlier quoted context omitted.
Time synchronization over a network with unknown latency characteristics is fundamentally impossible.
Wow. It’s a wonder anyone has a correct time then. /s Sarcasm aside, their NTP servers are less than 2 hops from my router. I know that because of excellent tools like ping and trace route.
Re: The end of a myth: Distributed transactions can scale
#48Thank you for this. I implemented multiversion concurrency control in Java with threads but I want to raise it to multimachine. The problem I have is that the read and write timestamps need to be available to detect if a transaction between machines conflicts. How do I synchronize read and write timestamps with minimal latency? When a database replica receives a transaction for key X, it needs (a) a timestamp that is…
Also see https://tikv.org/deep-dive/distributed-transaction/timestamp...
Cockroachdb describes their approach here: https://www.cockroachlabs.com/blog/living-without-atomic-clo...
Re: The end of a myth: Distributed transactions can scale
#49Re: The end of a myth: Distributed transactions can scale
#50Earlier quoted context omitted.
I don’t think Chrony is NTP, if we are being pedantic, just NTP compatible. My servers have hardware timestamping on the network interface and chrony uses this.
That would be PTP then
PTP has good support in higher-end switches and routers, but it's difficult to secure and make resilient to failures. It was designed for automation and control networks in factories etc. NTP is a better fit for computer networks, but there doesn't seem to be any switches or routers with HW NTP support. If you really need the best accuracy with NTP, you can find old 100Mb/s hubs on ebay and create a separate network.