Key factors for designing scalable web based application

Currently I am working on web based application. I want to know what are the key factors a designer should take care while designing scalable web based application ?

-------------Problems Reply------------

That's a fairly vague and broad question and something you could write books about. How far do you take it? At some point the performance of SQL JOINs breaks down and you have to implement some sharding/partitioning strategy. Is that the level you mean?

General principles are:

  • Cache and version all static content (images, CSS, Javascript);
  • Put such content on another domain to stop needless cookie traffic;
  • GZip/deflate everything;
  • Only execute required Javascript;
  • Never do with Javascript what you can do on the serverside (eg style table rows with CSS rather than using fancy jQuery odd/even tricks, which can be a real time killer);
  • Keep external HTTP requests to a minimum. That means very few CSS, Javascript and image files. That may mean implementing some form of CSS spriting and/or combining CSS or JS files;
  • Use serverside caching where necessary but only after you find there's a problem. Memory is an expensive but often effective tradeoff for more performance;
  • Test and tune all database queries;
  • Minimize redirects.

Having a good read of highscalability.com should give you some ideas. I highly recommend the Amazon articles.

Every application is different. You'll have to profile your application to see where you should concentrate your optimization efforts. Some web applications might require database access optimizations, while others have complicated business logic that cause the bottleneck.

Don't attempt to optimize random arbitrary parts of you application without first profiling. You might end up having to support complicated optimized code that doesn't actually make your application snappier.

I get the sense from the other answers here that there is a general confusion between scalability and performance. High performance means that the response is quick. High scalability means that you get a response no matter how many others are also using the site at the same time. There's a big difference.

In fact, you actually have to sacrifice a little performance just to get good scalability. A general pattern to scalability is distributed computing. Factoring functionality out into separate tiers of clustered servers (web, business rules, database) is the usual approach to scalability. That extra round trip will slow down page load a little bit.

Everyone always wants to focus on high scalability but also don't forget that, for software vendors who sell licenses to customers who self host the application, scaling down can be just as important as scaling up. An application that can run on a single server for ten users but can also be configured to run on a ten server web cluster, a three server middle tier, and a four server database cluster for 10,000 users would be a system well designed for scalability.

None. Just code the application using proper design techniques (separation of concerns, etc) and then when the application is done or nearly done, do your performance testing. You'll find the real bottlenecks then - they won't be what you might have guessed in the beginning. This is where your proper design from the beginning comes into play - it makes it easy to make changes to fix the bottlenecks.

Sometimes, a specific answer is more helpful than just generic tips.

If you want to scale, the only thing to target is SPEED (in hardware and software) and RESOURCES (in hardware).

Hardware, the latter is expensive (more servers, load-balancers, etc.).

So, by carefully selecting your initial development framework you will save a lot of time and resources -up to several orders of magnitude.

For example, nginx is (much) faster than Apache.

Other solutions are faster than nginx (for both static and dynamic contents) but I could not disclose them without being censored on StackOverflow (it was rated SPAM & advertising despite the fact that this is a FREE solution).

That's the limits of "sharing": we must share only "acceptable" solutions rather than efficient solutions.

Cheers,

Pierre.

Category:java Views:0 Time:2009-08-16

Related post

  • Design Patterns web based applications 2010-08-22

    I am designing a simple web based application. I am new to this web based domain.I needed your advice regarding the design patterns like how responsibility should be distributed among Servlets, criteria to make new Servlet, etc. Actually I have few e

  • Design Pattern of a MVC3 web based application 2011-10-12

    I am NEW in MVC3 and designing a web based application and kind of in learning phase. I am building a project where I need to show a list of customers in a web grid. Now, I need to email a list of customers everyday, whose info (Name) is not updated

  • What are the cons of a web based application 2008-09-21

    I am going to write a database application for the camp I work for. I am thinking about writing it in C# with a Windows GUI interface but using a browser as the application is seeming more and more appelaing for various reasons. What I am wondering i

  • How to write good help pages for rich web based application screens? 2009-08-26

    I'm working on writing help pages for a web based application. What tools, resources, and/or best practices are there to write help pages that are geared towards individual pages of a rich web application with a lot of functionality? The help system

  • When is Java the right choice for Web-based applications 2009-09-28

    I've been doing some research into taking my programming experience and moving into the java programming marketplace, due to a combination of personal interest and local market forces. As you can gather from the title, the vast majority of my experie

  • How to design a mobile-based application for examination assessment 2011-01-28

    I want to design a mobile-based application that enable lectures set question through iphone. I have had an website designed by PHP that lecture can set question through internet. How to change and start? Please tell me the detailed process. Thank yo

  • Should web based applications follow web standards? 2009-03-06

    By day, I am a front-end web developer but in my off time I dabble with other languages such as C, Objective-C, Python, etc. When I first got into web development the idea of web applications was just getting started. Since then two amazing framework

  • Rapid Application Development tools for web based applications 2009-04-29

    I want recommendations on an easy to learn tool or programming language to develop web based applications. It should provide rapid application development (RAD), be cross platform and able to connect to various databases. An example could be Ruby, Tu

  • Implementing a fully-functional prototype for a web-based application 2009-06-24

    I am building a prototype for a web-based application and was considering building the front-end in HTML, which can then be reused later for the actual application. I had done a Flash-based prototype earlier, which embedded the .swf into a C# executa

  • When i run web based application i.e. configured with the IIS then it gives connection related error 2011-04-25

    Hi I have created web based application. I configure with IIS but when its run under iis then it gives error: System.Data.SqlClient.SqlException: Failed to generate a user instance of SQL Server due to failure in retrieving the user's local applicati

  • WP7 + Web Based applications - Minimizing code duplication 2011-05-09

    I'm starting to jump in to WP7 development and I have a few questions. My current background/experience is with ASP.NET. I'm new to Silverlight as a whole, so I have some questions regarding the architectural design of the application. I don't have e

  • Allowing users to point their domains to a web-based application? 2011-09-07

    I'm possibly developing a web-based application that allows users to create individual pages. I would like users to be able to use their own domains/sub-domains to access the pages. So far I've considered: A) Getting users to forward with masking to

  • Creating a web based application through PowerPoint 2007 2013-06-10

    Hello Can one create a web based application such as a visual configurator/online design tool with Power Point 2007? Thanks Mini --------------Solutions------------- PowerPoint is designed to create slides and presentations. Though you can use it for

  • What is the best web based application to access a database 2008-09-27

    Sometimes we deploy applications behind customer firewall and we need read only access to their DB for debugging issues as sometimes their IT people are not SQL savvy. We want to bundle our application with some web based application that will expose

  • 3d Graphics for a Web Based Application 2008-11-19

    I've to create a Web Based Application, that amongst other things, includes the following tasks Loading a 3D model from a database. Display the 3D Model. Doing Inverse Kinematics computations to generate the series of steps for the model to move from

  • When to write web-based application and when to write desktop-based application? 2008-12-20

    Now is time to write all for web-based applications? Write web applications is slower than winforms-based applications? When to write web based and when to write desktop based? --------------Solutions------------- You should write all your applicatio

  • Log web based application 2009-06-18

    I'm developing a sort of web application and recently come a need to log some of user activities in it. Therefore come with natural question is it a good idea to use Apache server logging mechanism for that? If the answer is yes, please explain why a

  • updating data record by record or updating a whole Datatable in web-based application? 2009-06-30

    in web-based application, which method is prefered? I also need some examples about this issue. Thanks in advance. --------------Solutions------------- If you're going to update a large number of records then it would be advisable to use bulk/batch u

  • In web-based applications, using a data reader or a data table as a place for holding data gathered from DB? 2010-01-02

    hi all I have heard that in web-based applications, when we want to get data from DB, it's better to collect data into a data reader instead of a data table. What 's your choice? --------------Solutions------------- DataReaders and DataTables do two

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.208 (s). 11 q(s)