Is there a theorem like CAP for web development?

12 Views Asked by At

When you're building something in a web development scenario you're often thinking of costs/resources, and you're often juggling between three resources:

  • CPU (Processing in general)
  • Memory (Storage in general)
  • Network/Bandwidth (Or maybe even external/server resources)

The theorem here is simple, you can only choose two of these to be low.

If you want low CPU and Memory, you'll have to ask the server to do the work (High bandwidth usage)

If you want low Memory and Bandwidth, the CPU will have to do extra work to create and recreate things on the go.

If you want low CPU and Bandwidth, the memory will have to store more information and possibly duplicated data.

My question here, is there a name for this theorem? Or the managing of these 3 resources? I would like to know more about the theory behind choosing the best options in each scenario and researches related to this.

To be honest I don't know if this is the right community for this question, it is mostly a theoretical/academic question.

1

There are 1 best solutions below

1
On

It doesn't work this way. For all 3 resources you can achieve low usage percentage by simply adding more resources in most cases. If you have high CPU usage then deploy your app to the server with two times more CPUs. So if you have money you can achieve low usage levels. In CAP it doesn't matter how much money you have.

Also from Wikipedia:

CAP is frequently misunderstood as if one has to choose to abandon one of the three guarantees at all times. In fact, the choice is really between consistency and availability only when a network partition or failure happens; at all other times, no trade-off has to be made