Understanding the basic concepts
As we have mentioned before, the idea behind PL/Proxy is to scale out writes as well as reads. Once the writes are scaled out, reading can easily be scaled with the techniques we have already outlined in this book before. It is really necessary to point out that writes are the key issue here because reads are more easily scaled using plain old replicas.
The question now is: how can you ever scale out writes? To do so, we have to follow an old Roman principle, which has been widely applied in warfare: "Divide et impera" (in English: "Divide and conquer"). Once you manage to split a problem into many small problems, you are always on the winning side.
Applying this principle to the database work means that we have to split writes and spread them to many different servers. The main aim here is to split up data wisely.
As an example, we simply assume that we want to split user data. Let's assume further that each user has a username to...