Study Note 6: The core Principles and case studies of large Web site technology architecture: The high-availability architecture of the site

Source: Internet
Author: User
Tags message queue

One, the website usability measure

1, the site is not available to measure: The site is not available is also known as a site failure, the industry commonly used how many 9来 to measure the usability of the site.

2. Usability Assessment of website

Ii. High Availability Site architecture

1. Application Layer

Servers located in the application tier typically respond to high concurrent access requests, and a set of servers is serviced by a load balancer device to provide services to a cluster, when load balancing devices monitor

When the application server is unavailable, it is removed from the cluster and the request is distributed to other available servers in the cluster.

2. Service Layer

The service layer is similar to the application layer, only responsible for the different directions, the application layer mainly interacts with the user, the service layer accepts requests from the application layer, processes the business, and realizes the interaction with the data layer.

3. Data layer

The data tier server is special, the data server stores this data, in order to ensure that the server downtime data is not lost, the data Access service is not interrupted, the data must be written to synchronize data replication, data written to multiple servers, to achieve data redundancy backup.

When the database goes down, the application switches to the server that has the backup data.

Three, high-availability applications

1. Non-stateful service failover through load balancing

2, the application Server cluster session management:

  • Session replication: Large network transmission; high memory requirements
  • Session binding: Load balancing the use of hash algorithms always assigns users from the same IP to the same server. If the server goes down, the user's session is lost.
  • Cookies are used to record sessions: they need to be transmitted back and forth between the client and the server, the cookie is small, the recording information is small, and the user may prohibit the use of cookies;
  • Sesssion Server: Provides a centralized session server to store sessions that can be deployed in a cache, in-memory database.

Iv. High-availability services

1, classification management: core applications and services using the best hardware; Service deployment isolation, low-priority services are isolated on different virtual machines by starting different threads or deployments.

While high-priority services are deployed on different physical machines, core services and data are even deployed in data centers in different cities.

2. Time-Out setting: Sets the timeout for service invocation and, once timed out, the communication framework throws an exception.

3, asynchronous call: through the message queue and other asynchronous way, to avoid a service failure resulting in the entire application failure situation.

4. Service downgrade: Denial of service and shutdown feature. Deny low priority services and turn off unimportant features.

5, idempotent design: Service Repeat call is unavoidable, how to ensure that the operation results of repeated calls is very critical, so you must ensure that repeated calls and calls once produced the same result, that is, the service is idempotent.

Service idempotent is sometimes natural, such as setting the user's gender as a male, regardless of how many times it is set, the result is the same, but for operations such as transfer transactions, the problem becomes complex and requires information such as transaction numbers.

For service invocation validation, only valid actions can continue.

Study Note 6: The core Principles and case studies of large Web site technology architecture: The high-availability architecture of the site

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.