In my last post I dis­cussed the the­o­ret­i­cal proof of the CAP the­o­rem. Both the the­o­rem and the proof have a lim­i­ta­tion that might very well ren­der them not-so-uni­ver­sal as as­sumed.

The lim­i­ta­tion of the CAP proof

The lim­i­ta­tion of the CAP proof (as for­mu­lat­ed by Lynch et al) is the fol­low­ing: it as­sumes that - for the pur­pose of avail­abil­i­ty - re­quests are to be served even when there is a par­ti­tion in the clus­ter.

A way around the lim­i­ta­tion

There is a way around this lim­i­ta­tion - al­though it may sound ex­ot­ic: just make sure that there are no par­ti­tions when re­quests are served.

How? By sim­ply do­ing the fol­low­ing:

  • Queue re­quests (e.g., in JMS).
  • Only process re­quests when there is no par­ti­tion prob­lem.
  • Send re­spons­es asyn­chro­nous­ly, for in­stance via email.

Since no par­ti­tion (hope­ful­ly) lasts for­ev­er, this so­lu­tion does not lead to live­lock.

Also, note that quo­rum so­lu­tions ex­ist to avoid that the com­plete clus­ter has to be up at the same time.

Is this the ca­pit­u­la­tion of CAP? Who knows...

RSS

3 Comments

1 picture-d2c591f3b20f4e5e77aaa52650781c93.jpegPetrolHead|20 Jan 2009 - 20:11|
0

Have you read:

http://portal.acm.org/citation.cfm?id=214121

"Impossibility of distributed consensus with one faulty process"?

This is an important result and has significance to your comments and the CAP theorem. Essentially one can't tell the difference between a genuine failure and a slow running machine or busy network.

Thus your solution might work for a very small number of machines all in a single data-centre but for larger installations, failure of machines, routers, switches, cables etc will happen several times a day and thus quorums and clusters become considerably less practical and loose consistency more attractive.

Note also that the theorem isn't just about clustered services in the traditional sense but also services that run across multiple data-centres.

I also have a specific observation:

"....note that quorum solutions exist to avoid that the complete cluster has to be up at the same time."

This is true but they are limited by a number of factors practically:

(1) The assumption that you will have a majority - seemingly this is straightforward but a partition plus a loss of a machine can leave you without a majority.

(2) Getting all members back into sync. Can require all sorts of special admin involvement and it can go wrong.

(3) Performance - quorum protocols especially across enough nodes to ensure survival can be slow.

(4) Ensuring that clients don't continue to make use of the minority during a partition e.g. reporting out-of-date information.

(5) You can have a cluster capable of achieving consensus but you can't reach it because the network is broken between cluster and clients.

Best,

Dan.
http://www.dancres.org/blitzblog

2 picture-6335faf0051bc60a4bbb512df5818b68.jpegGuy|20 Jan 2009 - 20:30|
0

Hi Dan,

Sure have I read "Impossibility of distributed consensus with one faulty process" - it is at the basis of the heuristic exceptions in all two-phase commit solutions (including Atomikos).

However, what I am saying is that the failure usually only lasts for so long, and afterward things can move on. Exploiting the right tools to do that can help availability.

That is the main advantages of (persistent) queues and that is all I am saying. Lynch et al do not seem to exploit it as much as they could...

Guy

3 picture-81986788436815e6aaf7ff724a9e4514.jpegbarry|28 Mar 2009 - 21:45|
0

» Only process requests when there is no partition problem.

Doesn't this mean that you are sacrificing availability? You've turned a failure in partitioning into a failure in availability. While the answers and responses are queued so no request or response is lost, that doesn't mean all is well. A response may take a long time to come back which is as much of a problem as getting an error.

Corporate Information

Atomikos Corporate Headquarters
Hoveniersstraat, 39/1, 2800
Mechelen, Belgium

Contact Us

Copyright 2026 Atomikos BVBA | Our Privacy Policy
By using this site you agree to our cookies. More info. That's Fine