With the advent and adoption of REST as the pseudo standard (there is no W3C standard for it, the canon of REST is a dissertation you can find online) for public APIs, a new way of doing load balancing is possible. You can combine layer 7 load balancing with REST to have some interesting architectures. A load balancer doing layer 7 load balancing actually inspects the HTTP header, plus the URL and even the file type to figure to which server, or group of servers, to forward the request. The Big IP F5 load balancers have a way of entering complex rules to determine the load balancing algorithm according to layer 7 data.
So, suppose you are developing a web biography management application. You create a REST API that your RIA client can access to get biography data (let's pretend wikipedia does not exists). Since you followed the REST pseudo standard to the letter, when the application hits www.yourfooapplication.com/person/TuringAlan the servers return the biography of Alan Turing. Then if your application hits www.yourfooapplication.com/person/DijsktraEdsger the servers return the biography Edsger Dijsktra. The application becomes a huge hit and you need to add more servers besides the one application server and the one database server you have. You will also need to load balance across servers. What are your options?
The traditional option is to use sharding. If you have two application servers and and two database servers, then load balance against the application servers and put the two database servers in a cluster. The problem is that managing a database cluster is usually difficult, particularly without excellent storage. Now, you could divide the data between the two database servers. The biographies from A to M will go one database server, the biographies from N to Z will to another. By going to another I mean, that one database server will only have the data from A to M and the other will only have the data from N to Z. This seems like a great idea. The size of the individual databases is reduced and there is no need to cluster the databases. Performance will most definitively improve. Of course, now every single server is a single point of failure and the application has no high availability. This could be solved with HA pods using the same principle. Then it is just a matter of configuring the load balancer to forward request matching www.yourfooapplication.com/person/A* to M* to one server and www.yourfooapplication.com/person/N* to Z* to another.
This architecture does not work. What if later down the road you need to implement a search feature? How will you organize searches across two databases? With slow across DBs join statements? This example is obvious, but the problem could be more subtle. For example, a job posting site that decides to use this strategy to load balance for jobs in certain regions. This application could be logically partitioned into states. The each state is managed by a different set of servers. So, jobs in California will be managed by one set of servers, while jobs in Oregon will be managed by another. This architecture also breaks down if a user needs to look for jobs in two states at the same time.
Layer 7 load balancing is a powerful tool. And there is room for it to be used in combination with REST APIs. Just keep in mind, that the Database Layer can not be logically divided for one application.
I know this is a really old post, but wanted to drop a comment anyway. You mention that doing cross-DB searches is a bad idea, but this is easily solved by using search technology like Solr, which is much more powerful than DB searches anyway.
We currently use Solr sharding to search across indexes created from multiple source applications like our CMS, Blogging platform, product DB etc
Posted by: Tim | February 22, 2010 at 07:05 AM
Hi,I’m taking some time to write you a comment. I hope you don’t mind I’ve bookmarked your page, your article is genuinely usefull for me,http://www.mbtselling.com
Posted by: mbt shoes | June 05, 2010 at 01:21 AM
Hi,I’m taking some time to write you a comment. I hope you don’t mind I’ve bookmarked your page, your article is genuinely usefull for me,http://www.mbtselling.com
Posted by: mbt shoes | June 05, 2010 at 01:28 AM
"Love is not a thing to understand.
Love is not a thing to feel.
Love is not a thing to give and receive.
Love is a thing only to become
And eternally be. ."
Posted by: moncler jackets | August 18, 2010 at 01:11 AM
Thank you very much for this easy to follow guide, it was very usefull.
http://filecraft.com
Posted by: Rylie | September 14, 2010 at 08:50 AM
One should love animals. They are so tasty.
Posted by: Supra Shoes | November 06, 2010 at 01:55 AM
Calculation of your website traffic software, very good, and features a very powerful, my favorite.
Posted by: Supra Skytop II | November 07, 2010 at 11:46 PM
I can imagine TONS of uses for this
Posted by: buy on taobao | November 12, 2010 at 01:23 AM
I was once asked.*_*
Posted by: nike air max | November 16, 2010 at 10:50 PM
**This is one lovely looking layered salad!
Posted by: UGG Shoes | November 16, 2010 at 11:24 PM
Love is not a thing to understand.
Love is not a thing to feel.
Love is not a thing to give and receive.
Love is a thing only to become
And eternally be.
Posted by: adult sex toys | December 02, 2010 at 02:12 AM
NONO....NO MATTER THE DISTANCE....
Posted by: Cheap UGG Boots | January 24, 2011 at 02:28 AM
Your words help a lot, thanks!
Posted by: Chanel J12 | March 30, 2011 at 05:11 PM
i agree with your views from here.
Posted by: Nike Air Max | April 20, 2011 at 08:26 PM
Meeting you was fate, becoming your friend was a choice, but falling in love with you was beyond my control.
Posted by: cheap jordan retro | May 05, 2011 at 07:43 PM
In our world, not only do we have variability, we've got unpredictability.
Posted by: Jordan Basketball shoes | May 06, 2011 at 08:11 PM
The paramount duty of Congress is to stop deficiencies by the restoration of that protective legislation which has always been the firmst prop of the Treasury. (William Mckinley, American president)
Posted by: Cheap Nike Shox | August 03, 2011 at 05:55 PM
Pervert! Let's get out of here. There are so many perverts here.So what? You are such a bad person Who's gonna like you? Tiffany Jewelry Don't mind him. Don't mind him. He's just playing. Forget him. He saw me steal the diamond. Tiffany Jewelry You're dreaming! In your dreams. Wake up and smell the coffee.Where'd you get it!Good idea.Think it over.You can never tell about this sort of thing.Take a closer l Wake up and smell the coffee.Where'd you get it!Good idea.Think it over.You can never tell about this sort of thing.Take a closer look.When did I say that!You have to be on time. Don't be late. ook.When did I say that!You have to be on time. Don't be late.
Posted by: True Religion Jeans outlet | August 11, 2011 at 02:27 AM
Everytime I work one of these camps I get strengthened and reminded of the ways of a warrior. One of those ways is that I am bigger than any obstacle. Well while I was in the final days of camp and the changing of many lives I received a phone call that my home was seriously damaged by water. In pursueing the the explaination I learned that my friend who was watching over my animals left the water running in my master bathroom for several hours at full force damaging the upstairs but more so the downstairs as the water ran throughout the walls and ceilings.
Posted by: Air Jordan Retro | September 16, 2011 at 08:07 PM
Pervert! Let's get out of here. There are so many perverts here.So what
Posted by: armani jeans | September 22, 2011 at 05:17 AM
so
Posted by: Dr Dre Solo | October 24, 2011 at 01:13 AM
I opine that to get the loans from banks you ought to have a firm reason. Nevertheless, once I've received a auto loan, because I was willing to buy a car.
Posted by: Sandra23Noble | November 04, 2011 at 07:19 AM
I feel delighted to read such a good post, I would like to thank the Author for this marvelous efforts.this post is good in regards of both knowledge as well as information. Thanks for the post.
Posted by: Moncler Outlet | November 08, 2011 at 11:09 PM