K
K
kopytse2017-02-20 13:32:24
PHP
kopytse, 2017-02-20 13:32:24

What should a high-load API be written in - "PHP" or "Node.JS"?

API on which of these technologies will be easier to adapt to more and more new loads as new ones increase?
Addition: "MongoDB" is planned to be used as a database.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
I
index0h, 2017-02-20
@index0h

There was already a similar question with the same error. The task defines the language. Whether the project is an api server or not is not important. It is important what problems your server will solve.

I
Ivan Koryukov, 2017-02-20
@MadridianFox

Highly loaded, and indeed any serious project, it is necessary to write not "on what?", but "how?". More precisely, you need to write code in such a way that it supports horizontal scaling.
This means that your code should be able to run on several servers at once and not so that separate parts are in different places, namely duplicated. "Before" the copies there should be a balancer, which, based on how loaded this or that server is, chooses which server to address the incoming request to.
It is also worth considering the bottlenecks, or rather get rid of them. For example, a database, it may or may not support running its copies on different servers.
User sessions can be stored centrally, or you can make a "sticky" session, when all requests from one user will always go to one server.
As a result, highload is not about what software is written on, but about how it is written.

E
emp1re, 2017-02-20
@emp1re

Is there a difference? Everyone has a chapel, scale your load on multiple servers through radish for example -
adrianmejia.com/blog/2016/03/23/how-to-scale-a-nod...

V
Vitaly Stolyarov, 2017-02-20
@Ni55aN

nodejs-vs-php-performance-requests-per-s

A
Andrey Nikolaev, 2017-02-20
@gromdron

What will your api do? What is your logic already written on (maybe you have already used symfony 3, then it makes little sense to install nodejs as well) or is it not there either?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question