Technical architecture of large Web sites (vii)--The scalable architecture of Web sites __ Large Web sites

Source: Internet
Author: User
Tags message queue

Large Web site technology Architecture (i)--the evolution of large Web site architecture

Technical architecture of large Web sites (II.)--Architecture mode

Technical architecture of large Web sites (III.)--core elements of architecture

Technical architecture of large Web sites (iv.)--high performance architecture of the website

Technical architecture for large Web sites (v)--high-availability architecture for Web sites

Technical architecture of large Web sites (vi.)--The scalable architecture of Web sites

Extensibility refers to the ability to continuously expand or upgrade the system function in the case of minimal impact on existing systems.

The core idea of designing web site Extensible architecture is modularization , and on this basis, the coupling between modules is reduced and the reusability of modules is provided. Through distributed deployment, modules are deployed on separate servers (clusters) to physically separate the coupling relationships between modules.

Distributed Message Queuing and distributed service are the main methods for the concrete aggregation after the distributed deployment of modules. 1, using distributed message queue to reduce system coupling

If there is no direct call between the modules, the new module or modification module will have minimal impact on other modules, so the scalability of the system is undoubtedly better.

Event-Driven framework : The typical architecture is the producer consumer model by transmitting event messages between low coupling modules to maintain the loose coupling of the modules and by using the communication of event messages to complete the cooperation between modules. In the large-scale website architecture, the concrete implementation means many, the most commonly used is the distributed message queue, as shown in the following figure:

Message Queuing works with the publish-subscribe model, the message sender publishes the message, and one or more message recipients subscribe to the message.

Because the message sender does not need to wait for the message recipient to process data to return, the system has better response latency, and at the peak of site access, messages can be temporarily stored in Message Queuing for processing, reducing load pressure on backend storage such as databases.

At present, open source and commercial distributed Message Queuing products have many, more famous have Apache Activemq, and so on, the following is the architecture principle of distributed Message queue:

2, the use of distributed services to create reusable business platform

Using distributed services is another important means of reducing system coupling. If the distributed message Queue breaks the system coupling through the message object, the different subsystems process the same message; then the distributed service is decoupled through the interface, and the different subsystems use the same interface description for the service invocation.

Requirements and characteristics of distributed services for large Web sites: load Balancing failure transfer efficient remote communication integration heterogeneous Systems real-time monitoring of application minimal intrusion version management

At present, there are more successful implementation cases of open source Distributed service Framework is Alibaba's Dubbo, the following figure is the Dubbo architecture principle:

The service consumer program uses the service through the service interface, while the service interface loads the concrete service through the proxy, the specific service can be the local code module, can also be the remote service, therefore to the application small intrusion; the application needs to invoke the service interface, which automatically invokes the local or remote implementation according to the configuration

The Service Framework client module loads the list of service providers through the service registry (the service provider initiates the initiative to register its own list of available service interfaces to the service registry), locates the required service interfaces, and sends service invocation requests to a service provider server based on the configured load balancing policy. If a service invocation fails, the client module automatically selects a second server that provides the same service from the list of service providers to request a service again, realizing the automatic failover of the service and ensuring high availability of services. 3, use the open platform to build the Web site Ecological Circle

Large Web sites to better serve their users, open more value-added services, will be the site's internal services encapsulated into a number of call interface open, a total of external third-party developers to use, this provides an open interface platform is called an open platform.

Open platform is the internal and external interface of the site, the external need to face a large number of third-party developers, the internal need to face a lot of business services within the site. Although the business scenarios and requirements for each site are different, the architecture design for the development platform is similar, as shown in the following illustration:

API Interface : A set of APIs that the development platform exposes to developers, in the form of RESTFULL,WEBSERVICE,RPC and other forms.

protocol Conversion : converts various API inputs into forms recognized by internal services and encapsulates the return of internal services into API format.

Security : In addition to the general application needs of the identification, access control and other security measures, open platform also requires a hierarchical access bandwidth constraints to ensure that resources are fair and reasonable use.

Audit : Record access to third party applications and monitor, charge, etc.

Routing : maps the various access routes of an open platform to specific internal services.

Process : organize a discrete set of services into a new context-related service, hide service details, and provide a unified interface for developers to invoke.

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.