Stable and efficient connection multiplexing/read/write separation between MySQL and MSSQL/sharding-advances HTTP technology to the data layer

Source: Internet
Author: User
Tags mssql netscaler

read a few articles about the database read and write separation, mostly the official open source Mysql-proxy and its derivative projects, and at the end often talk about the difficulties in actual deployment. The first learning test and deployment of a long cycle, while adding a layer of agent in the middle of the database more than a layer of failure points, the need for professional operations personnel to continue development and patient maintenance, such as problems can only give the problem to the community . when the business pressure increases, it is often found that the delay of this agent is becoming more and more high.

So I'm going to talk about NetScaler's datastream technology. Citrix NetScaler Load Balancer The first and currently the only product that supports protocol content such as MySQL and Ms SQL. If you're in touch with some HTTP-level load balancing and look at this article, you'll be pleasantly surprised to find that while the HTTP protocol and SQL protocol are not exactly the same thing from code, NetScaler finally implements the multiple-advantage technology of HTTP to the database level.

1 Connection Multiplexing Technology

Maintain each TCP connection we need to consume a certain amount of system resources, depending on the size of the memory, each server can support a very limited number of concurrent connections. Connectivity multiplexing is a very common optimization technique.

Connection multiplexing is the core patent of NetScaler, and many vendors implement similar functions to pay patent fees to NetScaler. , the client a large number of TCP connections are NetScaler take over and then based on the protocol content for multiplexing compression, the server reduces the new pressure, only need and netscaler dialogue to concentrate on the content response of the upper layer protocol. NetScaler extends this technology to the database protocol, where the reuse ratio is typically more than 50:1 for SQL transmissions.


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/72/F4/wKiom1XwhtuRzfvlAAJxgMuHoVQ243.jpg "title=" Multiplexing1-1024x454.png "width=" "height=" 221 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:500px;height : 221px; "alt=" wkiom1xwhturzfvlaajxgmuhovq243.jpg "/>

Http://netscaler.blog.51cto.com


2 Content Exchange Technology (database reading and writing separation, etc.)

In HTTP processing, NetScaler can identify the use of HTTP request URL and other content for distribution, and at the SQL level need to understand select,drop,insert,update and so on a series of statements such as read and write separation operations, the most basic principle

650) this.width=650; "Src=" http://docs.citrix.com/content/dam/docs/en-us/legacy-edocs/ Netscaler-traffic-management-11-map1/master-slave2.png "width=" 640 "height=" 480 "alt=" Master-Slave2.png "/>

@Netscaler_Insight



Configuration and management is very simple, here's a simple example

    • To generate a policy with the Graphics wizard


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/72/F1/wKioL1XwlIKQ_ahhAAFBDSDuRzk205.jpg "title=" 1.png " Width= "850" height= "309" border= "0" hspace= "0" vspace= "0" style= "WIDTH:850PX;HEIGHT:309PX;" alt= "wkiol1xwlikq_ Ahhaafbdsdurzk205.jpg "/> Believe you have understood what this strategy is going to do: the command MySQL requested contains" select ". It's simple, isn't it?


    • Select a policy to match the target SQL Server

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/72/F4/wKiom1XwlGXzcpmTAAD6GCCfKQs066.jpg "title=" 2.png " Width= "height=" 407 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:350PX;HEIGHT:407PX; "alt=" Wkiom1xwlgxzcpmtaad6gccfkqs066.jpg "/>


3 Content Switching Technology (shard)

The principle of the same, we can query the library or table and so on, the content of the query to guide different database server

650) this.width=650; "Src=" http://docs.citrix.com/content/dam/docs/en-us/legacy-edocs/ Netscaler-traffic-management-11-map1/howtokenlbmethodworkswithdatastream.png "width=" 737 "height=" 342 "alt=" Howtokenlbmethodworkswithdatastream.png "/>




4 Health Detection Technology-database

When there are multiple servers in the backend, you must determine if the backend is online. For the website, we can check the content of the webpage. For the database, we can emit arbitrary SQL statements and determine the health status according to the return value, if the value and expected mismatch, will not send the client's request to this server

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/72/F1/wKioL1XwmgjiKbVSAAEVqUIV_VU535.jpg "title=" 3.png " alt= "Wkiol1xwmgjikbvsaaevquiv_vu535.jpg"/>


5. Security


NetScaler can do multiple policies to control access security and generate detailed logs for performance analysis and auditing. Response actions are made before the request is delivered to the backend server.

View SQL Performance Logs

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/72/F1/wKioL1XwpIqBlvGOAALBLlU4aq8105.jpg "title=" 20150910051900.png "width=" "height=" 249 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:800PX;HEIGHT:249PX; "alt=" Wkiol1xwpiqblvgoaalbllu4aq8105.jpg "/>



At the same time, for the front end, NetScaler is an ultra-high performance Web application firewall, can protect against SQL injection, prevent information leakage and other malicious attacks


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/72/F5/wKiom1XwpuaQNHkpAAEZHmdX2MA167.jpg "title=" 20150910053823.png "alt=" Wkiom1xwpuaqnhkpaaezhmdx2ma167.jpg "/>



650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/72/F5/wKiom1Xwr7yxoV-xAAFleQwlUM4678.jpg "title=" 20150910061608.png "alt=" Wkiom1xwr7yxov-xaafleqwlum4678.jpg "/>


6. Stability, performance and scalability

As a leader in application delivery, NetScaler has been known for its high stability and low latency. Can be deployed in a master or cluster deployment, the configuration will looking back worry-free. As your business grows, use license to unleash higher performance or add new devices to scale out!

In this paper, we briefly summarize the relevant technology of Netscaler for database, you can focus on Weibo @Netscaler_Insight and this blog exchange discussion. Next blog Goodbye!

This article is from the "netscaler_insight" blog, make sure to keep this source http://netscaler.blog.51cto.com/9136680/1693309

Stable and efficient connection multiplexing/read/write separation between MySQL and MSSQL/sharding-advances HTTP technology to the data layer

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.