R
R
RedRus2016-10-11 11:34:04
Java
RedRus, 2016-10-11 11:34:04

Under what loads can you not do without using non-blocking approaches (use only OS threads and processes)?

It is clear that I am not talking about exact numbers. I'm worried if the project has a solid load (take, for example, "VKontakte", "Odnoklassniki", "Twitter"), can it exist (and probably exists now), only on such approaches to multitasking as threads and processes? Naturally, nginx, redis, etc. used inside the project are not taken into account. similar tools that use non-blocking code. It's just about the app itself. The application will basically be I / O bound (we will assume that we are talking about a web application such as a social network).
At the university we go through the topic of building highly loaded systems. I would like to ask knowledgeable people under what loads it becomes necessary to switch to various non-blocking technologies (light threads, event loops) and it is no longer possible to manage with ordinary operating system threads? Or is it possible to do without "light threads" technologies at all in order to build sufficiently heavily loaded projects?
I cannot understand why such code is needed, which is written on "light threads". Isn't this a reinvention of the wheel when there are already operating system threads? I know that threads cause context switches, which creates overhead. But this overhead doesn't seem like much (the maximum I've seen is 30 microseconds per switch), and the "light threads" switch should also have an overhead.
PS I basically understand the difference, as I think, between "light threads", event loops and various non-blocking technologies. Perhaps somewhere I am not expressing myself correctly. Please excuse me. I hope it's clear what I'm talking about.
Best regards,
Dmitry

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
aol-nnov, 2016-10-11
@aol-nnov

tyts and her domestic counterpart (there are links)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question