Answer the question
In order to leave comments, you need to log in
All http servers in the majority are not multi-threaded?
Goodnight.
Servers that write in php that we get from django or flask, are they not multi-threaded?
Those. for highly loaded servers that work via http, this is not necessary, is it exclusively for game servers or downloading files from the site?
Answer the question
In order to leave comments, you need to log in
It is necessary to distinguish between an http server and a web application. An Http server is a program that directly receives network requests and then, if necessary, sends them to a web application for execution.
All popular http servers (Nginx, Apache, Caddy) implement multitasking in one form or another (threads, asynchrony, etc.). When processing multiple requests, the http server launches multiple copies of the web application, which is usually single-threaded, but can implement threads using the language.
In web frameworks (Flask, Django) it is possible to raise an http server, but it is usually intended only for development, and not for real applications. For example, Flask's basic http server is single-tasked and cannot process multiple requests in parallel.
However, scripting languages can have production-ready http servers, which also implement multitasking. So, Python has Waitress and Gunicorn.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question