Architecture decisions · Performance and scale
The database or API is the bottleneck
A page or an API call is slow, slower under load, and the first proposal is more servers or the cause everyone already suspects.
01
How it is diagnosed
A baseline first; then the tool that shows each cause: the database's statement statistics and query plans, a CPU profile and the server's counters, under the load users really produce.
02
The options, side by side
03
What decides between the options
Which stage holds the time, and whether the cost is in a query, in the code, or in how long a connection or a row lock is held.
| What decides | A Fix the most likely cause first | B Add hardware | C Measure first, then change one thing at a time |
|---|---|---|---|
| Knowing what mattered What is not measured cannot safely be kept or undone. | limited Only if the suspected cause was the real one. | limited No. | suits it Each cause measured alone. |
| Detecting a regression A later change can bring the cause back. | limited No. | limited No. | suits it The same day, with the same command. |
| Time to the first gain Sometimes the business needs relief this week. | suits it Short. | suits it The shortest. | needs work Longer: the measurement comes first. |
Knowing what mattered A B C
What is not measured cannot safely be kept or undone.
- A · Fix the most likely cause first limited Only if the suspected cause was the real one.
- B · Add hardware limited No.
- C · Measure first, then change one thing at a time suits it Each cause measured alone.
Detecting a regression A B C
A later change can bring the cause back.
- A · Fix the most likely cause first limited No.
- B · Add hardware limited No.
- C · Measure first, then change one thing at a time suits it The same day, with the same command.
Time to the first gain A B C
Sometimes the business needs relief this week.
- A · Fix the most likely cause first suits it Short.
- B · Add hardware suits it The shortest.
- C · Measure first, then change one thing at a time needs work Longer: the measurement comes first.
04
What the work looks like
The step of the offer where a case like this usually starts:
03
Architecture assessment
Findings, risks, options and next steps, in writing. A good starting point when the scope is not yet clear.
05
Articles that show this
Is this your case?
Send it with this problem already selected; the next page asks which options you considered and a little context. No verdict on your system: that only comes once I understand it.
Or write to me directly at contacto@danielcolaco.pt.