Web Application Server Layer Sizing and Deployment (3.2)

The following document describes sizing and deployment best practices for the Web Application Server Layer.  This sizing document assumes a Linux based environment and on-premise.  Cloud environments can differ.


Sizing Notes

  • The Web Application Servers are servers tuned for medium cpu and memory capacity.  
  • These servers are dedicated to ProcessMaker and share no other responsibilities
  • For production environments, there should be a minimum of two servers in order to balance traffic and provide redundancy (if one server is out of commission).
  • Depending on the level of redundancy security the customer requires, the production web application server cluster should at LEAST support one server being unavailable.  This means the other remaining servers should have surplus CPU/RAM capacity to handle the extra load if this occurs.
    • For example, if there are two production servers, ideally 50% of one server's capacity should handle 100% of the volume at peak, at a minimum.
  • Consider one CPU compute core (or hyper-thread) to every 4 gigabytes of memory.
    • For example, for a web application server that has 64GB of memory, a 16 thread/core processing environment is suggested.
    • Assume a maximum allowed size per server to be 128GB of memory, with a minimum of 32 thread processing.
    • Assume a minimum base frequency of 2.4GHz
  • Consider a dedicated 128MB allocated for an active user at a time
    • This value could change, depending on memory requirements for certain processes, etc.  This value is based on the memory_limit in PHP's configuration file and also should account for the overhead of webserver worker memory requirements
    • For total amount of users, assume a buffer to allow for 30% spikes at any time
  • No redundancy is required at the hard-drive level
    • Application files are stored on the fileserver mounts (NFS)
    • Customer assumes responsibility for system logging and rotation
    • Customer assumes responsibility for Operating System and Webserver maintenance
    • SSDs are not required, in fact, platter disks are recommended for system file logging
  • These servers should have gigabit network interfaces
    • Should be local to the shared resources of the load balancer and dependencies (File Server, Databases and Caching)


Total Memory Required Calculation:

(pu * mmpu * 1.3) / 1024 = tm

  • Let pu represent peak number of users
  • mmpu represents maximum amount of memory, in megabytes per user)
  • 1.3 allows for 30% growth/spikes at peak
  • tm represents total memory required for this environment


Total Minimum Server Required Calculation:

(tm * rl) / mps = sc > 2 ? (sc rounded up) or rl = ms

  • Let tm be total memory required
  • Let rl be the redundancy level specified (a minimum of 2)
  • Let mps be the maximum amount of memory per server the customer can acquired (remember a maximum of 128GB recommended)
  • Let sc be total server count
  • Round up sc to ensure adequate servers
  • There is always a minimum of the redundancy level required
  • ms is the minimum server required


Memory Per Server Calculation:

(tm * rl) / ms = (mmps rounded up to whole number divisible by 8) = mps

  • Let tm be Total memory required
  • Let rl be redundancy level required by customer
  • Let ms be minimum server required
  • Let mmps be minimum memory per server
  • mps be the value of mmps rounded up to whole number divisible by 8


CPU Core/Thread Per Server Minimum:

(mps / 4) = cps

  • Let mps be memory per server
  • Let cps be cores/threads per server


Examples

Widget Co.

Widget Co has the goal of 200 simultaneous users at their peak time.  They've stated they can only support servers with 16GB total memory.  They request that they have a redundancy level of 2 (half of their fleet could be down at any time).  Memory per user will be 128MB (default).

Memory Calculation: (200 * 128 * 1.3) / 1024 = 32.5GB

Server Count Calculation: (32.5 * 2) / 16 = 4.0625 > 2 = 5

Minimum Memory per server: (32.5 * 2) / 5 = 13 rounded up to whole number divisible by 8 = 16GB per server

CPU Cores per server: 16 / 4 = 4

Summary: Widget Co needs 4 webservers, with 16GB of memory per server.  Each server should have 4 cores or threads supported.


Example Inc.

Example Inc has the goal of 2000 simultaneous users at their peak time.  They've instructed the maximum amount of memory they want in each server is 64GB.  That want a redundancy level of 3 (They want a third of their fleet to be able to handle the entirely of their load).  Memory per user will be 128MB ( default).

Memory Calculation: (2000 * 128 * 1.3) / 1024 = 325GB

Server Count Calculation: (325 * 3) / 64 = 15.234375 > 2 = 16

Minimum Memory per server: (325 * 2) / 16 = 40.625 rounded up to whole number divisible by 8 = 48GB per server

CPU Cores per server: 48 / 4 = 12

Summary: Example Inc. needs 16 web servers, with 48 GB of memory per server.  Each server should have 12 cores or threads supported.