Internet Finance High Concurrency scheme

Source: Internet
Author: User
Tags http redirect

Small micro finance, scene finance and other emerging bank financial services need a new flexible architecture to deal with high concurrency, large traffic impact, while meeting the application of rapid version iteration upgrade, agile operation and maintenance management and other needs. This article shares the Bocloud Boyun novel How to use the Internet application architecture and Docker container technology to help the banking industry cope with the "Internet +" challenge, and build an agile it architecture based on the PAAs platform.

Mobile Internet channel Innovation is a business change that traditional enterprises cannot and cannot evade, whether access or self-built Internet channels need to answer the following questions: Can the current IT architecture deal with the explosive impact of Internet channel innovation business? What kind of IT architecture solves this problem and has a good ability to expand to meet future needs? Taking the banking industry as an example, the traditional bank channels are relatively single, basically around the branches and operating outlets, the whole IT system construction performance indicators in the overall index system is often less important than business reliability. However, all this is changing, and the channel innovation business around the Internet channel has changed the status quo.

New Financial It needs

The banking industry has already parted from the traditional banking-centric business model, and has begun to transform into business design and financial innovation centered on customer demand, which is also the connotation of scene finance. Whether it is the traditional electronic banking business, or channel innovation Direct banking business, as well as the internet finance all kinds of treasure, are to meet the customer's financial needs of various scenarios established financial business. is a modern bank of some of the business and its based on the operating platform.

Banking CIOs need to address three key issues around customers, channels, data, and platforms:

    • How to quickly get your business online to meet the rapidly changing market?
    • How does the application architecture respond to the load pressure of instantaneous large-scale concurrent requests brought by Internet channels?
    • How to achieve a large number of business applications, services and data unified management and ensure that the two issues resolved?

The use of the past chimney-type construction model has the following three drawbacks:

    • The construction cycle is too long. The traditional construction mode from the planning, procurement, development, online, commissioning and other stages to launch a new business application, the time span can be achieved from a few months to several years, very long. Marketing applications such as Internet-based events need to respond to events in a timely manner, with very stringent requirements for the business-to-live cycle, and the traditional model is clearly unmet.

    • Extensibility does not meet business needs. Traditional applications are generally based on planning capacity for design and development, the size of the user can be estimated, under extreme conditions can be queued and other mechanisms to reduce load pressure. However, the "second kill", "snapping" and other application models do not have such a precondition, the user size will be explosive increase in a very short period of time. A simple queuing strategy allows users to significantly reduce the quality of products and services evaluation, not to meet the needs of rapid expansion.

    • Business closed. There is little mutual access between traditional business and business, and business services are not reusable in the design and operation process, let alone meet the needs of multiple scenarios for concurrent access.

Construction ideas


In order to solve the above problems, we have worked with several banking structure departments to plan the new Financial IT Foundation platform of "heavy platform, light application and service".

The next generation of it architectures should have the following features:

    • IT infrastructure and service platforms have integrated the basic components or services required by the application, such as resource requisition services, scheduling services, messaging services, data services, and so on. The concept of a heavy platform lies in the fact that a large number of basic services or empirical data can be "deposited" in the platform, forming the core of the application infrastructure.
    • Application development, on-line, iterative upgrades need to be agile enough. This relies on the platform integration of basic services, on the other hand, the platform can be quickly implemented for application encapsulation, release, iterative upgrade support, with one-click Deployment, upgrade and other features.
    • The architecture of the application needs to be "encapsulated" by the platform service or component, and the service or component can improve the concurrency of the system while having the characteristics of parallelization, in addition to reducing the service response delay, the most important thing is to support the large concurrent access demand through the whole platform service.

From the point of view of business requirements, the "light application" platform can quickly "assemble" a new business form to meet the rapidly changing needs of the market, "service" on the one hand to strengthen the more connections between the business to improve the quality of service, on the other hand can be good experience and practice to solidify to enhance business competitiveness. The "Heavy platform" feature can effectively support the business load pressure through the "ability" of the entire platform, ensuring that the application's resource requirements, scalability requirements, concurrency requirements, etc. are met.

Of course, these features are not natural and need to be changed from two aspects of application architecture and platform innovation to ensure goals are met.

Application Architecture Optimization

Back to mobile Internet mode application should have features: 1, need to be able to deal with a large number of users concurrent access requirements, that is, the application architecture to have excellent concurrency and flexibility, 2, the application to be able to quickly iterate, on the one hand to meet business development needs, on the other hand can continuously tune performance to improve service quality; 3, The application architecture meets the need to quickly "assemble" new business applications to support the rapidly changing market. In other words, the application architecture should have:

    • powerful concurrency capability;
    • Flexible elasticity;
    • Agile iteration capability;
    • Standardization of the availability of the Assembly;

These capabilities need to be optimized from multiple angles, and typical optimizations include: Traffic load balancing, asynchronous IO, Message Queuing, read and write separation, sub-database table, object caching, service splitting, Indexing Service, distributed content management, CDN, Space change time optimization, and so on.

I. Load balancing

Depending on the business model and the business service agreement, generally selectable load balancing schemes include: Link layer load Balancing, IP layer load Balancing, HTTP reverse proxy, DNS domain name resolution load balancer, HTTP redirect load Balancing. Large Web sites or business services often use a variety of means to load balance traffic, such as the first based on DNS to achieve multi-data center load Balancing, and then based on IP to achieve multi-service load balance in the data center, and finally in the reverse proxy to achieve unified service between the different servers load balancing.

II. Asynchronous IO

Asynchronous IO is an important technique to improve the concurrency of the system, and the asynchronous IO also has the task (message) queue, thread pool, and persistent connection technology. Asynchronous IO Technology is an example of an event-driven programming model: A user request is put into the task queue and then awakened by the task dispatcher, which removes the task from the task queue and distributes it to the idle thread, and the thread triggers the asynchronous IO operation and registers the callback method. When IO returns, the callback method re-removes the task from the task queue and returns the result. The whole process is as follows:

Iii. Message Queuing

Message Queuing has four aspects to improve the system concurrency performance: 1, asynchronous processing through Message Queuing, such as the above asynchronous IO task queue is can be based on Message Queuing implementation, 2, task parallel execution, through Message Queuing can be the traditional serial execution of the task as far as possible to modify the parallel program; 3, Application decoupling , and improve the expansibility of the system;
4, the traffic cutting peak, through the message queue to introduce the queuing mechanism, the peak load can be as smooth as possible. A messaging system for a Web site.

Iv. database reading and writing separation/sub-Library sub-table

As the number of visits increases, the pressure on the database system becomes larger. In an information system, the performance of database system is often the most important index to the overall performance of the system. From the point of view of database architecture design, the commonly used optimization methods are read-write separation and sub-database table. The former is a technology that uses the read-write request to route to different libraries to reduce the pressure of the database system, which can improve the concurrent reading of the system to the maximum extent, especially for the access mode of reading and writing less. Data synchronization between two libraries ensures consistency of data. Read and write separation modes are as follows:

As the business runs, the amount of data in the database grows. When a certain record entry is reached, a query often takes a long time to return results. This is the sub-database of the design of the table mentioned on the agenda. The Sub-library design is generally based on the business of different content into different databases, also become vertical split. This split mode is more flexible and easy to operate, and the disadvantage is that it is necessary to consider the business query join problem across multiple databases. The Sub-table design is also called horizontal splitting, which is to split the data in the same table into two or more databases. The reason that the data is split horizontally is that the amount of data in a business or the amount of updates reaches the bottleneck of a single database, and this table can be split into two or more databases. Mycat is the most commonly used sub-library middleware, for the MYCAT architecture, interested students can go to MYCAT official website to learn.

V. Service splitting

Service splitting is the splitting of the business logic subsystem that ran all the past in an application container, running separately inside a separate container. This has two advantages: 1, can reduce the system coupling degree, make the business has the fast iteration ability, 2, conveniently locates the subsystem which affects the performance, the targeted performance optimization. For example, after the SMS subsystem is split from the whole system, the system can easily test the concurrency efficiency and delay of the SMS sending and receiving, so that the design improvement and architecture optimization can be targeted.

VI. Memory Cache

As the amount of traffic increases, there is a growing number of users accessing the same part of the content, and it is not necessary to read from the database every time for these more popular content. We can use caching techniques, such as using Memcacahe as the cache for the application tier, or using Redis as the database tier cache. In addition, the cache system can be used to store some data that needs to be shared, such as the session information of the user logged in. Sharing sessions through the cache system is an important technique for single sign-on and session management. The system architecture after adding the cache is as follows.

Vii. Indexing System

For Fuzzy Lookup, it is often insufficient to use the Read database to query, even if the separation of read and write, this problem is still an important situation affecting performance. Take the trading website type as an example, search for goods or services based on keywords is one of the most commonly used functions, especially according to the title of the product to find the corresponding product. For this requirement, we do this in database operations through the like feature, but this approach is expensive and time consuming for large numbers of queries. At this point we can use the index of the search engine to complete.

VIII. Distributed Storage System/CDN

For access optimization of unstructured data, the general strategy is to build a distributed storage system. The supporting distributed storage System is a storage system with good expansibility and concurrency performance, and the well-designed distributed storage System can realize the fast location of access files, speed up reading and writing, and realize high concurrency. For example, Ceph is an excellent open source distributed storage System.
A CDN is a larger-scale optimization tool that typically operates on large or very large network services. With CDN, you can place infrequently changing resources on the edge of the network, accelerating the speed of end-user access to resources.

Ix. space Time-to-change optimization

Optimization of space-changing time a typical application scenario is a version of a different resolution that provides the user with a uniform picture at different resolution screens, which is the overhead of automatically generating different resolution images when a user uploads a picture based on a common screen resolution. This optimization is also useful for video, multi-format storage files, and more.

In summary, using various optimization methods after the entire Internet application architecture as shown.

Platform Innovation

The above architecture also faces a number of challenges, including:

1. How do I deploy such a complex system?
2. How to quickly locate the high-debt pressure bottleneck subsystem and automatically expand the processing capacity?
3. How can an iterative upgrade of a version be executed in a controlled and orderly manner?

How to solve these problems? This paper reviews the three features of the next generation platform architecture, namely, "Heavy platform, light application, service", in which the characteristics of re-platform and service are the direction of the problem-solving ideas.

Behind the concept of heavy platform and service is that the whole platform has solidified a large number of components or subsystems that can provide services independently, and the application needs only the part of the business logic to complete the deployment of the whole system. To achieve this, you need to do the following three points:

    1. The application needs the separation of business logic, data storage and service components to realize the independent operation of business logic, data and Component Services;
    2. The platform has the ability to define (orchestrate) business architectures based on business, data and services (components), enabling the orchestration and deployment of the business.
    3. The platform is capable of managing operations, components (services), and data storage subsystems to ensure that the user experience is enhanced automatically when load pressure increases.
      This involves technologies such as application encapsulation, orchestration, and elastic scaling (auto-ops). Bocloud Boyun novel Docker-based cloud application release and operations management platform is based on the concept and needs of the development. Beyondcontainer Product architecture for Bocloud:

, the Beyondcontainer consists of three main parts:

    • Infrastructure sub-platform: the infrastructure that manages the platform, in addition to the infrastructure such as servers, storage, and networking, and includes infrastructure management related to the application, such as mirrored warehouses, containers, components, and so on.
    • Application Management sub-platform: Responsible for managing all kinds of applications on the platform, providing application deployment, maintenance, logging and other management control, while enabling multi-tenant environment, the implementation of service directory-based application publishing services.
    • Integrated Monitoring sub-platform: responsible for the entire platform of resources, applications, communications and other monitoring, and visual form of external display system of various types of monitoring information.

Confined to space, the architecture and features of Beyondcontainer are no longer discussed here.

Summarize
This article shares the experience of Bocloud Boyun novel in helping traditional enterprises to innovate in the application and platform architecture when dealing with the impact of the mobile internet business, and hopes to inspire them.

Internet Finance High Concurrency scheme

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.