A
A
achuraev2017-11-30 15:47:21
Highload
achuraev, 2017-11-30 15:47:21

Which architecture is better in terms of performance and scalability?

Immediately: it is clear that each project needs its own architecture and there are no templates when it comes to highload.
Often there are solutions in the form of separating servers into front (for rendering pages) and back (for API). In my case, development on node in cluster mode with a balancer on nginx. Each node worker provides both the API part and the rendering of the page, and it seems that this should be good, because. in node io is asynchronous. Due to the fact that all servers are identical - they are easy to scale and deploy (you can end up leaving 2 servers and turning off one at a time with a split architecture, you need 4). And my question is that using a different architecture with a division into the API of the server on the node and the server under the front (let's say on apache + php) can I win something? I wonder if anyone has tested node rendering performance against apache+php.
PS - Abandon server rendering and go to Angular 2 (for example) is not an option.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
VoidVolker, 2017-11-30
@VoidVolker

Tailored for specific tasks.

  1. Formalize the tasks that the architecture of your particular project should solve.
  2. Carry out load testing of the system in accordance with the tasks.
  3. Build graphs and charts based on the results.
  4. Examine the result and find bottlenecks.
  5. Optimize bottlenecks according to tasks.
  6. profit.

V
Vladimir, 2017-11-30
@Casufi

Is it cheaper to request a server that generates a front that requests an API, or just request an API? What Angular, what React, what Vue support serverside rendering, and when a user enters the site, he may well get a rendered page, and then load only the API.

A
Alexey Dugnist, 2018-04-26
@Dugnist

If we are talking about a modular architecture, I suggest taking a look:
https://github.com/Dugnist/jsberry
I will be glad for forks or contributors...)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question