One of the Linux cluster Series--cluster basic concept

Source: Internet
Author: User

    PHP Senior Engineer Linux cluster (multi-state host combined to complete a task)

Here to share with you the majority of network hackers commonly used attack methods and preventive measures.

If there is a bad, more comments (qq:1595068971-e-mail: [email protected])

  load-balanced cluster lb(improves the ability of the service to deal with the disease) increases processing power

Measurement: The ability to deal with disease (how many requests can be processed at one time)

  High-availability cluster ha(an always-on-line capability to enhance service is fundamental and does not result in service unavailability due to downtime) increases service availability

Metrics: Online Time/(online time + fault processing time)

99%,99.9%,99.99%,99.999%

Replace the server (boot process, IP address, can write data)

According to the survey opened the webpage more than 3 seconds, the loss reached 60%.

Basic concept simulation 200 disease-prone users, 50 dynamic requests, 150 static requests (process occupy 2M dynamic 10M) 500+150*2=800m

Configured with a 4G memory 2cpu to handle.

Problem: Accept 200 requests anytime, anywhere. Will involve a lot of network IO and disk IO (CPU switching resources, access to disk files)

 processing Mode one : scale on up. Upgrade servers, increase memory, increase CPU

Ratio of hardware growth to performance growth (4g,2cpu! = 16g,8cpu)

  processing mode two : Scale out scaling increase server (different users access different servers also called load balancer-lb)

    Abc,abc,abc,abc Such a distribution rule is called rotation

Load balancing defects: For example, a user first access-"DNS resolution-" to the cache-"allocation server. That is, a user after one access, the state is in the cache, and then again access will be assigned to the same server. result in not being distributed according to existing conditions.

What you see from the browser is not necessarily from the same server

  Load Balancer Plots:

  

It has high availability, but not a highly available cluster (it cannot notify Heartbeat information)

At the same time call a MySQL, upload files stored in NFS.

  What if the server performance of the load Balancer cluster is different?

If the server is hosted differently, the ability to handle it is different. ANI to distribute the request. This means that the dispenser should be compatible with different scenarios. (also called weighted err)

A server to two

b Server to a

C Server to a

 What happens when the dispatcher can't handle it?

Divide the page into modules, and a module requests a load Balancer cluster.

Build a better dispenser.

The master dispatcher notifies its heartbeat at any time

  Health Check for back-end servers (headrtbeat):

The dispatcher checks the server three times to make sure the server is broken and kicks the server out.

If the server is OK, the building will come.

  Where is the paging file placed?

Page file on a server, the update can only trust one server, other server synchronization update (rsync copy files, copy only different files, support remote)

Kernel monitoring file (inotify) If the paging file server changes, send notifications to other servers to copy.

  NFS File Sharing Server:

The file is stored on an NFS disk, and the Web server requests a file-level request,

A file contains a number of blocks

  High-availability cluster plots:

Multiple hosts communicate with each other through a single switch, sending heartbeat information (delivered only to specific hosts)

  If each set up a server, you need to build a server to prevent the host necrosis, is not very expensive resources?

  

Ip,wei Service, paging file

One is the primary server (DC) is responsible for coordinating the completion of various transactions between these nodes is also called the transaction Coordinator;

If the DC hangs off from the new selection

  Brain crack problem?

If the boss is not dead, too busy, not send heartbeat. The second thought eldest brother died, the eldest brother to take over, in the eldest brother to make a knife, let him die;

All inherit the power switch-the power switch sends instructions, the second tells the power, cut off the boss's power. This operation is called (headshot)

Avoid cluster splitting with at least three nodes

    

To ensure that the first node is hung, the data for the second node is the same as the first node (the first node allows write operations)

    Das-nas

Establish read array shared storage

    block Request , there is nothing in the shared server, it is empty, there is no lock.

    

Two hosts simultaneously request NFS,NFS will lock A, reject B

File request

    

  

One of the Linux cluster--basic concepts of clustering

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.