Operations and Resources

Server Farms require a number of components to work together. This comes at a measurable cost of extra CPU and network, especially for the web server.

The following table contains the high-level sequence of events every time the web server serves a web request. The Resource Required column offers some insight into the consequences of scaling up a User base. The Added by Cherwell Server Farm column indicates if the Operation is added when configuring a Cherwell Server Farm. Based on the information in the table, consider additional resource usage.

Operation Added by Cherwell Server Farm Resource Required
Request begins
Web Server sends a Redis request to get latest Session State Yes CPU, negligible
Redis Server retrieves state and send it over the network Yes CPU, light
Web Server waits for 3-5MB of data to be transferred to the web server from Redis Yes Network 3-5mb/User
Web Server decompresses 3-5MB of data Yes CPU
Web Server deserializes 3-5MB of JSON Yes CPU
Web Server Execute request as usual
Web Server serializes session state Yes CPU, light
Web Server compresses session state Yes CPU, light
Web Server send 3-5MB of state to Redis Yes Network 3-5mb/User
Redis Server stored session Yes CPU, light
Web Server ends request

Resource Considerations

Based on the table above, consider the following:

Memory Usage

  • Web server: Non load-balanced Cherwell Servers are memory intensive, but load-balanced servers free up memory as soon as a request is ended. This makes memory a less probable bottle neck.
  • Redis: Redis is used as a centralized in-memory database. Everything stored in Redis is kept in RAM. There should be enough RAM to serve concurrent Users. A good rule is 10 MB x Expected peak number of Users.

CPU

  • Web server: The cost of deserializing session is four times the cost of serialization.
  • Redis: If using a single-server scenario (no slaves), the rule is that 5000 Users will probably use about 15% of your CPU. Remember to assign 2 CPUs to your Redis machines. One will be used by the system, the other one by your Redis process.

Network

  • Traffic between the Browser and the Web server: This is highly dependent on your content, and outside the scope of this document. Bottlenecks are related to the volume of traffic between the Cherwell Web Server(s).

    Network traffic between Browser and Server is not affected by a server farm configuration, and therefore is not considered in this document, but evaluate if the network is prepared to support the traffic.

  • Traffic between each web server and Redis: This number is highly dependent on your content. Each page on the browser might turn into multiple web requests, depending on the page content.

    Best practice: Estimate between 6-10 MB of memory usage per User session. For example: 1,000 concurrent Users x 10 MB/User = 10 GB of RAM per server.