InfoQ

News

Generic versus User Specific Data Streams for Scalable Web Sites

Posted by Gavin Terrill on Mar 04, 2008 09:57 PM

Community
Architecture
Topics
Performance & Scalability
Tags
Load Balancing,
Caching

Gojko Adzic, author and IT consultant, has published an interesting article on the architectural benefits of separating static versus dynamic content for scalable web applications:

One of the most important architectural decisions that must be done early on in a scalable web site project is splitting the data flow into two streams: one that is user specific and one that is generic.

The main rationale for partitioning  data this way is because the constraints for each use of data predicate different caching and state management approaches:

For example, most generic data flow is completely stateless, but user-specific actions are often stateful. If these two flows are clearly separated, then we can process generic actions with stateless services and servers. Stateless services are much easier to manage and scale than stateful services, since they can be easily replaced without any effect on the system operation. You can just stack more cheap servers and throw requests at them using round-robin or simple load balancing when you need more power. Stateful services cannot be scaled so easy — they might rely on resource locking and load balancers have to send all requests for a single session to the same server. If a stateful server dies, that has a visible effect on the system operation, so these services have to be much more resilient than stateless ones.

Gojko provides guidance for how to separate the data streams. For a two-tier application, this includes creating different data sources. For the data stream that has static data, turn on caching and turn off transactions. A more elaborate setup is proposed for three-tier applications:

In three tier architectures, I like to split the middleware straight from the start into user-specific and generic servers. Web servers sit on top, get the generic data from the first middleware group and process transactions using the second middleware group. Generic data-flow servers can be clustered and scaled easily, and any load balancing system will work right out of the box. They can be restarted, taken out of the cluster or put back in without any effect on the rest of the system. Transparent caching can be applied to those servers easily. User-specific servers, on the other hand, are much more tricky in all those aspects and should absolutely never be transparently cached. This split is a preparation for further scaling and caching, since generic data servers can be split regionally, put under several layers of cache servers, divided vertically by product range or type. The functionality on user-specific servers is focused and isolated, so that we will have less to focus on when we need to partition that later.

Gojko suggests moving as much as possible into the generic servers to take advantage of the power of caching, citing techniques such as loading the user specific content into a generic page using AJAX, and using cookies to store user details that would typically be displayed at the top of each page. The generic data stream can then by served by highly performany http servers, such as LightHttpd.

1 comment

Reply

Google Benimle dalgamı Geçiyor ? Ya sizce by sanane zorlayin Posted Aug 26, 2008 3:54 PM
  1. Back to top

    Google Benimle dalgamı Geçiyor ? Ya sizce

    Aug 26, 2008 3:54 PM by sanane zorlayin

    Adidas Ayakkabı, Boot, or Nike , UGG Bot, Online Shoping, Nike Shophing, Turkey Nike Online Giyim Adidas Ayakkabı Nike Ayakkabı Adidas Ayakkabı, Boot, or Nike , UGG Bot, Online Shoping, Nike Shophing, Turkey Nike Adicolor UGG Bot kurye of madeni türkey, Web design, Web devolopers, Google Adsense, google adwords or Shoping, Lojistik kurye zorlu kurye google reklam google kayıt google adwords arama motoru kaydı arama motoru kayıt reklam alışveriş haber google kayıt vinç seramik gavurlar adult forum sex porno adult erotik seks web tasarımı web tasarım web yazılım web hosting büyütücü 89 redtube porno sex seks penis büyütücü seks vprx erotik kurye kiralık araba Rent a Car Kiralık Araç Kiralık Otomobil alışveriş kurye kurye kurye kurye kurye motorlu kurye moto kurye e-ticaret e-ticaret e-ticaret sistemi sanal mağaza e ticaret akıllı e ticaret eticaret paketi or Business Sektöres Supporting Web sites or seo search engine optimitations web site

Exclusive Content

Agile and Beyond - The Power of Aspirational Teams

Tim Mackinnon talks about the aspirations behind the Agile principles and practices, the desire to become efficient, to write quality code which does not end up being thrown away.

Concurrency: Past and Present

Brian Goetz discusses the difficulties of creating multithreaded programs correctly, incorrect synchronization, race conditions, deadlock, STM, concurrency, alternatives to threads, Erlang, Scala.

ActionScript 3 for Java Programmers

Often the hardest part of changing technologies is language syntax differences. This new article provides Java developers with a transition guide to Actionscript which forms the foundation of Flex.

Neal Ford On Programming Languages and Platforms

Neal Ford talks about having multiple languages running on one of the two major platforms: Java and .NET. He also presents the advantages offered by Ruby compared to static languages like Java or C#.

Future Directions for Agile

David Anderson talks about the history of Agile, the current status of it and his vision for the future. The role of Agile consists in finding ways to implement its principles.

Nick Sieger on JRuby

Nick Sieger talks about the future of JRuby, Java Integration, and his work on JEE deployment tools for Ruby on Rails like Warbler.

Rustan Leino and Mike Barnett on Spec#

Rustan Leino and Mike Barnett of Microsoft Research discuss the technology in Spec# and its futures.

10 Ways to Screw Up with Scrum and XP

Henrik Kniberg talks about 10 possible reasons to fail while doing Scrum and XP. Maybe the team does not have a definition of what Done means to them, or they don't know what their velocity is.