Scalability in new startups

26 enero 2008 at 15:20

Fecha Filed in Internet, Computers, Bussiness 2.0
Tags Tags: , , ,

Since I started to build YouAre.com I knew that the scalability was an important matter to solve. Sometimes the scalability is more important for your pocket and for the success of your startup than originally thought. According to Google, a slow performance could cost you 20% of your revenue. If you are starting a new company, you ought to know that any savings in servers can accelerate the growth of your company. These costs include hardware, software, human resources and time (for many people the most appreciated resource). Apart from the monetary costs, it’s proved that half a second delay in page load time can kill a user’s satisfaction.

The scalability is a relative problem which depends on many things: the technology used, the fault tolerance and the availability of programming staff. Many people think that scalability=performance, and they are wrong as there are more aspects to be considered. For me, the scalability is to maintain the balance between the resources and the number of users, when the size of the problem increases. The size of the problem is the growth of the number of users and the resources. A graphic which represents a good scalability could be the following:

Scalability

We can appreciate how well the growth of users (n) have been solved. The amount of required resources grows logarithmically.

Some good points for scalability that should be considered:

  • Good database design: Normalize the database, select a suitable DBMS, consider the users’ necessities, …
  • Search engines: Use a search engine for your application. Lucene is a very high-performance text search engine library. You can also consider Nutch or Solr, both based in Lucene but oriented to web applications. If you are finding some engine more basic take a look at Sphinx.
  • The Keepalive problem: Enabling Keepalive for images and external files (such as CSS) is very good for clients, but bad for servers. Keeping Keepalive off we reduce a lot of the memory of the server. A good solution is to have separate images in a different server, getting the added benefit of higher browser concurrency with multiple hostnames (it will let you to load images in parallel). In YouAre, we are using Amazon Simple Storage Service to store our images.
  • Cache: Cache as much of your dynamic content as possible :) Memcache could be a great option.
  • Take care of your code: Take care of your code and it will take care of you ;)
  • Use GNU/Linux: GNU/Linux uses spare memory to cache files on disk. This means much faster I/O.

More information | Rico Mariani
More information | Shiflett
More information | No VC required

Comments Comments (6) Scalability in new startups Permalink Votar: Positive 0 Negative 0

XSL Cache by The New York Times

11 enero 2008 at 11:10

Fecha Filed in Computers
Tags Tags: , , , ,

The XSL Cache extension is a mod of PHP’s XSL extension developed by the NYTimes. This extension caches the parsed XSL stylesheet representation in sites that constantly the same transform is applied. The code is already working with a few applications on the New York Times’ website.

The installation is very easy. Just run the following commands:

phpize
./configure --with-xslcache=
 –with-xsl-exsl-dir=</path><path to libexslt>
make
sudo make install
</path>

Then you have only to add the line extension=xslcache.so to php.ini file and restart the web server. I’ve been doing some tests with XSL Cache and I got good results. The following code shows how to load a stylesheet and then use it to transform a parsed XML document:

<?php
$xsltpath = '/home/harrisj/example.xsl';

$xslt = new xsltCache;
$xslt->importStyleSheet($xsltpath);
$xml = DOMDocument::loadXML($source_doc);
print $xslt->transformToXML($xml);
?>

XSL Cache Logo

Link | XSL Cache Project

Comments Comments (1) XSL Cache by The New York Times Permalink Votar: Positive 0 Negative 0