Distributed, high concurrency, multithreading? What's the difference

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/wufaliang003/article/details/90746338

Many people think that is not distributed = = high concurrency multithreading?

When the interviewer asks to highly concurrent system which means can be employed to solve, or asked how distributed systems to solve the consistency problem is not forced to look ignorant?

At first, many people will confuse the three, mistaking the so-called distributed highly concurrent systems that can simultaneously access for mass users, while the use of multi-threading means is that we can not provide concurrent capacity systems? In fact, three of them are always attendant, but there are different emphasis.

What is distributed?

A more distributed concept is to solve the optimization means a single physical server capacity and performance bottlenecks is employed . The problem areas need to be addressed very much in the different technical aspects, but also include: distributed file system, distributed cache, distributed databases, distributed computing, some terms such as Hadoop, zookeeper, MQ and other related distributed related. Conceptually, a distributed implementation in two forms:

Horizontal expansion: When a machine could not carry traffic on the way by adding machine, will split the traffic to all servers, all machines can provide comparable services;

Vertical Split: the front end of the demand has a variety of inquiries, could not carry a machine, different requirements may be distributed to various machines, such as machines A ticket processing request query I, B machines for processing the payment request.

What is high concurrency?

Distributed relative terms, high concurrency in the problem-solving will focus on some of the reaction it is at the same time how a small amount : such as online video service, while thousands of people to watch.

High concurrency can be distributed to resolved through technology, concurrent traffic assigned to different physical servers. But beyond that, there are also many other optimization methods: for example, using the cache system, all the static content on CDN etc; you can also use multi-threading technology to maximize service capabilities of a server.

 

What is multi-threaded?

Multithreading refers to achieve concurrent execution of multiple threads technology from the software or hardware , it is more of problem solving CPU scheduling multiple processes, so that these processes appear to be executed simultaneously (alternating actually run).

These concepts, multi-threaded problem is most clear, is also relatively simple means, basically the biggest problem encountered is thread-safe . In the JAVA language, the need for JVM memory model, instruction rearrangement understanding, in order to write a high-quality multi-threaded code.

in conclusion: 

● Distributed from the perspective of the physical resources to the different machines form a whole Foreign Service, a very wide range of technical and very difficult, with this foundation, high concurrency, high throughput systems are easy to build;

● high concurrency is from a business perspective to describe the capacity of the system, the means to achieve high concurrency may be distributed, can also be used, such as a cache, the CDN, of course, also includes a multi-threaded;

● Multithreading is focused on how to use the programming language to maximize CPU scheduling capabilities.

No micro-channel public attention and headlines today, excellent article continued update. . . . .

 

Guess you like

Origin blog.csdn.net/wufaliang003/article/details/90746338