High-Performance MySQL front-end Vtocc_MySQL

Source: Internet
Author: User
High-Performance MySQL front-end Vtocc bitsCN.com

Vtocc is the first available product of vitess. as the front-end of MySQL, it provides an RPC Interface to receive and convert SQL statements. It provides efficient multi-channel large-scale database operation requests with concurrent processing capability of over 10 k. At the same time, an SQL parser is provided to allow the server to understand and intelligently optimize queries.

Vtocc has been used in a large-scale product environment and is the core of YouTube's new MySQL service architecture.

Sample code:

From vtdb import vt_occ2 as db
Conn = db. connect ('localhost: 6510 ', timeout = 5, dbname = 'mydb ')
Curs = conn. cursor ()
Curs.exe cute ('select * from mytable limit 5 ',{})
Print curs. description
For v in curs:
Print v
Print curs. rowcount

Main functions:

  • A Python DBAPI 2.0 compatible client interface (vt_occ2.py)
  • Understand various HTTP and TCP-based protocols
  • Query variables and query cache are supported to avoid repeated SQL parsing and reuse of query plans.
  • Connection pool
  • Transaction Management, which can limit the number of concurrent transactions and manage transaction failures
  • DML annotation: each DML is overwritten and contains a comment field at the end to identify the modified row record.
  • Built-in fault insurance
    • Query merge: The ability to reuse the results of an in-flight query to any subsequent requests that were committed ed while the query was still executing.
    • Limit the number of query results. if the number exceeds the limit, an error is returned.
    • You can delete some ultra-long transactions.
    • You can delete some queries that are too long.
    • Automatically clear idle connections

Vtocc module:

Method for getting Source code:Hg clone httphotoshop/target = _ blank class = infotextkey> ps: // code.google.com/p/vitess/

BitsCN.com

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.