Caching web requests on Tomcat, Jetty and JBoss

Posted: May 31st, 2016 | Author: | Filed under: Java web cache

We come to developing Cacheonix web cache after having to ask ops for adding caching to Apache/Ngnx and never getting it. It was time to take matters back to dev hands. We wanted a zero-effort, ideally zero-conf, cache for the content generated by web apps. That’s how Cacheonix web cache came to be. All you need to do is to add Cacheonix to your project:

<dependency>
    <groupId>org.cacheonix</groupId>
    <artifactId>cacheonix-core</artifactId>
    <version>2.2.2</version>
<dependency>

and then add Cacheonix filter to web.xml and you are all set:

<filter>
    <filter-name>CacheonixWebCache</filter-name>
    <filter-class>org.cacheonix.cache.web.RequestCacheFilter</filter-class>
</filter>

...

<filter-mapping>
       <filter-name>CacheonixWebCache</filter-name>
       <url-pattern>*.htm</url-pattern>
</filter-mapping>

Zero-conf set up caches the request, automatically generates client cache headers If-Modified-Since and uses gzip compression if the client supports gzip compression.

Check out the docs for in-depth background and advanced configuration: http://wiki.cacheonix.org/display/CCHNX20/Cacheonix+Web+Cache

Let us know what you think.

(No) Comments: Post a response

What is scalability, exactly?

Posted: May 11th, 2016 | Author: | Filed under: Scalability

Long story short, scalability is an ability of an application to process more requests by adding more computing resources. If your Java application can handle more work if you add more CPU, RAM or disk to your server, it’s called vertical scalability. In other words, your application scales vertically if it runs better if you give it a bigger, fatter server.

Horizontal scalability, on the other hand, is an ability to process more requests through adding more machines to your cluster. A cluster could be a simple bunch of independent servers or AWS or GAE machines behind a load balancer or an advanced infrastructure where servers communicate with each other to share work.

Note that scalability is not is performance. Performance is a number of requests per second. And while we are here, capacity is a maxim number of requests per second that your app can do without degradation of latency. And latency is the time between the client sends a request and the time it gets the response back.

(No) Comments: Post a response