Home » Blog » Linotype 1.2

Linotype 1.2

December 30th, 2003

There were major scalability concerns with Linotype 1.1 due to the poor file-system based content repository that was not able to handle metadata. For this reason, Linotype complexity was O(n) with the content contained in the repository and even less scalable for concurrent requests.

So, I have rewritten the way content is aggregated from the repository and now it’s now O(n) with the number of news, not with the content of them, still not perfect but a few orders of magnitude faster and much more scalable under heavy load.

Also, I’ve used the potentials of HTTPd much more and here is the httpd.conf file, in case you wonder:

# the modules you need for this to work
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule cache_module modules/mod_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so# Here I redirect to the SSL site (mounted on the same URI space) for the private section
# I do this to avoid password sniffers
RewriteEngine        on
RewriteRule          ^/~stefano/linotype/private/.* https://www.betaversion.org/~stefano/linotype/private/$1 [R]

# Here the properties are applied to the entire www.betaversion.org/ URL space
<Location />

# These are the configurations for mod_deflate that will GZIP encode
 # the output of everything generated in the / URL space
 SetOutputFilter deflate
 BrowserMatch ^Mozilla/4         gzip-only-text/html
 BrowserMatch ^Mozilla/4\.0[678] no-gzip
 BrowserMatch \bMSIE             !no-gzip !gzip-only-text/html
 SetEnvIfNoCase Request_URI     .(?:gif|jpe?g|png)$ no-gzip dont-vary
 Header append Vary User-Agent env=!dont-vary

# Here we mount linotype from Jetty running on port 8888 (which is
 # behind the firewall)
 ProxyPass        /~stefano/linotype/ http://localhost:8888/
 ProxyPassReverse /~stefano/linotype/ http://localhost:8888/

# These are mod_cache configurations
 CacheEnable mem /~stefano/linotype/
 CacheDefaultExpire 86400
  MCacheSize 4096
  MCacheMaxObjectCount 100
  MCacheMinObjectSize 1
  MCacheMaxObjectSize 2048

</Location>