- identify actual usage rates, max and seasonality (e.g. business calendar). The "usage rates" here is a performance measure (e.g. throughput, processing rate, #simultaneous transactions, storage/memory, network bandwidth Mbps)
- you can determine growth rate based on business assumption (e.g. the marketing manager said that the users of our social-apps will grow 10000% in 2 years) or using forecasting technique (e.g. Holt-Winter to predict trend)
- determine the headroom gain by optimization / refactoring projects
- add 10-20% usage margin (since machines that run with 100% capacity will be unstable)
- measure server peak capacity using load test
- compute: capacity needed = usage max + grow - headroom gain + usage margin
- If the capacity needed is below server peak capacity, you need to buy a better hardware (scale up) or trying to tune or trying to scale out (clustering).
- If you choose to scale out, compute the number of server needed = capacity needed / server peak capacity.
Caveats:
- Plan for 2-4 year, not too long since it's difficult to have good assumptions (e.g. growth rate) for long term. In 5 years you might have another marketing manager with different targets & growth assumptions.
- The number of server needed equation above is assuming that the cluster management work (load balancing etc) is negligible compared with the main works.
- The number of server needed equation above is assuming that the servers are in separated physical hardware. If these servers are virtual machines in one physical server then 1+1 is not 2 anymore.
- Understand which resources that need improvement (e.g. if network bandwidth is the problem adding more servers might not alleviate the problem).
- If possible try to scale-up first since it's easier, faster to implement and often cheaper than scale-out. But your vendor salesman might try to convince you that the scale-out upgrade packages is easier to integrate to your deployment environments and applications (just a matter of hiring his consultants), well as my wise grandma once said... always do fact checking to what the salesmen and politicians said.
Source: Steve's blogs http://soa-java.blogspot.com/
Any comments are welcome :)
No comments:
Post a Comment