Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capacity planning #23

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions help/performance/TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ user-guide-description: Optimize the performance of your Adobe Commerce or Magen
- [Development environment recommendations](development-environment.md)
- [Configuration best practices](configuration.md)
- [Deployment flow](deployment-flow.md)
- [Capacity Planning](capacity-planning.md)
- [High-throughput order processing](high-throughput-order-processing.md)
- Advanced concepts {#performance-best-practices}
- [Advanced setup](advanced-setup.md)
Expand Down
73 changes: 73 additions & 0 deletions help/performance/capacity-planning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
title: Capacity Planning
description: Learn about the steps necessary for capacity planning for Adobe Commerce or Magento Open Source.
---

## Capacity Planning
## Benefits

- Keeping the cost low/avoid over-spend on resource
- Reliability
- Intelligent resource allocation
- Help in High Availability & scalability
- Avoid emergencies

## Terminology


### Latency

![capcity-planning-letency](../assets/performance/images/capacity-planning-letency.png)

Additional time spend/delay between user's action and web application's response to that action.[Caching](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/cache_for_frontdevs.html?itm_source=devdocs&itm_medium=quick_search&itm_campaign=federated_search&itm_term=cach) is used to improve latency times.

lalittmohan marked this conversation as resolved.
Show resolved Hide resolved

###Throughput

``Throughput = number of completed requests / time to complete the requests``

![capcity-planning-throughput](../assets/performance/images/capacity-planning-thoughput.png)

Number of action per unit or number of processed over a given interval of time. For example if user perform 60 transactions in minute TPS would be 60/60 TPS = 1TPS.
considered an average of 1 TPS considering users uniformly accessing the system over 60 seconds.this of course means that we can also expect all users coming within a single second which means a 60 TPS max peak load

**Application server**

Not to confuse with a load balancer (Nginx), an application server is something that runs your Ruby,Node or PHP application listens to the TCP socket, accepts HTTP request, and returns the response from the application.

**Under-provisioned:**

lack of capacity which leads to higher response time or more frequent 502 Bad Gateway responses.

**Over-provisioned:**

running more capacity than you actually need and probably wasting money

**Availablity**

The availability of a system is determined by the following equation, which yields a percentage result.

``x = (n - y) * 100/n``

where 'n' is the total number of minutes in a given calendar month and 'y' is the total number of minutes that service is unavailable in a given calendar month.

| Availability(%) | Downtime per year | Downtime per month |
| :--- | :----: | ---: |
| 90% | 36.5 days | 72 hours |
| 95% | 18.25 days | 36 hours |
| 97% | 10.96 days | 21.6 hours |
| 99% | 3.65 days | 7.20 hours |
| 99.9% | 8.76 hours | 43.8 minutes |
| 99.99% | 52.56 minutes | 4.32 minutes |

[Clustering](https://devdocs.magento.com/cloud/architecture/pro-architecture.html?#pro-cluster-scaling) and Load balancing technique to achieve high availability by providing redundancy at software and hardware level

## Scalability

Scalability is the ability to handle requests in proportion to available hardware resources.system should ideally handle increase/decrease in requests without affecting the overall throughput

- Vertical scalability or Scale Up (increase performance of a server by increasing its memory, processing power)
- Horizontal scalability or Scale Out (deploy more instances of the same type of server)

## calculation
![Capcity-planning-calculation](../assets/performance/images/capacity-planning.png)
7 changes: 7 additions & 0 deletions help/performance/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ description: Follow these best practices to optimize the performance of your Ado

The _Performance Best Practices_ guide provides recommendations and instructions for optimizing the performance of your production deployment. Technical users who are responsible for maintaining stores in production mode should use the best practices described in this guide to help ensure their stores run at peak efficiency at all times.

>Performance refers to the speed with which a system responds to the user requests.

Performance depends upon
- [User load that your system support](https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-perf-data.html).
- [Adequate Hardware Resources](https://devdocs.magento.com/guides/v2.4/performance-best-practices/hardware.html).
- [How your system scales](https://devdocs.magento.com/cloud/architecture/scaled-architecture.html).

## Assumptions

* You installed Adobe Commerce or Magento Open Source using [Composer](../installation/composer.md).
Expand Down