Posted by: ceperez Last Updated: 2004-06-21 03:36:09 An accurate way of knowing what really works is looking at what truly works in practice The software industry is plagued with so many ideas that for all intents and purposes are. Purely theorem is the fact The software Vendors Continue To Praise and Sell these Ideas As Best Practices.
Massively scalable architectures is one area where not many practitioners have truly been a witness of. Fortunately, sometimes information is graciously released for all to see and hear. I gained a lot of wisdom reading about Google's design of its hardware infrastructure or even Yahoo's page rendering PATENT. NOW, Another Internet Behemoth, eBay, Has Provided US With Insight on Its Own Architecture.
THERE ARE MANY PIECES OF INFORMATION IN This Presentation, HOWEVER, I'll Try To Highlight and Comment On The ones That Are Unusual OR Interesting.
The impressive part is that eBay had 380M page views a day with a site availability of 99.92%. In addition to that, nearly 30K lines of code changes per week. Just plain and simply enviable, not only that, incontrovertible evidence of the scalability of Java.
Now for the details on how it is achieved Using J2EE Technologies. The Highlights to eBay's Scalability is as follows:
Judicious Use of Server-Side State
No Server Affinity
Functional Server Pools
Horizontal and Vertical Database Partitioning
?
What's interesting is how eBay enables data access scalability. They mention the use of "custom OR mapping" with support for features like caching (local and global), lazy loading, fetch sets (deep and shallow) and support for retrieval and submit update subsets . Furthemore, they use bean managed transaction exclusively, autocommited to the database, and use the OR mapping to route to different data sources.A couple of things are quite striking. The first is its complete lack of usage of Entity Beans, using its own OR mapping solution (Hibernate anyone?). The second is the partitioning of application servers based on use-cases. The third, the partitioning also of databases is also based on use-cases. The last is the stateless nature of the system and the CONSPICUOUS ABSENCE OF Clustering Technologies.
Here's The Quote About Server State:
This basically means that right now we are not really using server-side state We may use it;. Right now we have not found a good reason to use it [snip] if there is something that needs to be stateful, then we put. In The Database; We go back and get it Stateful Servers, Furthermore Forget About Clustering, You Simply May Not Need It, Read this About Functional Partitioning:
So we have a pool or a farm of machines that are dedicated to a specific use case; like search will have its own farm of machines, and we can tune those much differently because the footprint and the replay of those are much different than viewing an item, which is essentially a read-only use case, versus selling an item, which is read-mostly type of use case. [snip] Horizontal database partitioning is something that we have adopted in the last probably four or five years to really get the availability, and also scalability, that we need. In short, forget about placing your application and database on one giant machine, just use pools of servers that are dedicated on a use case basis. Does not that sound awfully similar to Google's strategy ? A little bit More about horizontal partitioning:
What enables our horizontal scalability is content based routing So, if imagine eBay has on any given day 60 million items We do not want to store that in one behemoth Sun machine [snip] let us scale it across;... May be, many Sun Machines, Buthow You Get To The Content-Based Routing Idea That Comes in Play. So, The Idea Was That Given Some Hint, Find Out Which of My 20 Physical Database Hosts Do I Need To Go To The Other Cool Thing About this is this failover Could Be defined. Finally a Word About Using A More Loosely Coupled Architecture In The Future:
Using messaging to actually decouple disparate use cases is something that we are investigating. Is not it strange that the original presentation was about J2EE Design Patterns? The key scalability ideas are only tangentially related to the Patterns. Yes, eBay does use patterns to structure their code, however, focusing on the patterns misses the entire picture. The key nuggets of wisdom are a stateless design, the use of a flexible and highly tuned OR-mapping layer and the partitioning of servers based on use cases. The design patterns are nice, however do not expect blind application of it to lead to scalability.In general, the approach that eBay is alluding to (and Google has confirmed) is that architectures that consist of pools or farms of machines dedicated on a use-case basis will provide better scalability and availability as compared to a few behemoth machines. The vendors, of course, are gripped in fear about this conclusion for obvious reasons. nevertheless, the biggest techni Cal Hurdle In Deploying a Large Number of Servers IS, Of Course, None Other Than NEED for ManagementAbility ;-)