Tang Jianfa, Chief Architect of NOSQL MongoDB: 20core handles 270,000 mixed read and write operations, and shares enterprise implementation cases

MongoDB is an open source database that can be applied to enterprises of all sizes, industries, and applications. As a database suitable for agile development, MongoDB's data schema can be flexibly updated as the application evolves. At the same time, it also provides developers with the features of traditional databases: secondary indexes, a complete query system, strict consistency, and more. MongoDB can make enterprises more agile and scalable. Enterprises of all sizes can use MongoDB to create new applications, improve work efficiency with customers, speed up time to market, and reduce business costs. (Excerpted from MongoDB official website)

In order to help you learn MongoDB knowledge more systematically and comprehensively, a MongoDB knowledge base is specially created, and high-quality content (articles, books, videos) is selected and presented to you.

Quote
Tang Jianfa, Chief Architect of MongoDB in Greater China, Founder of Chinese Community, and worked as technical director and chief architect in Hewlett-Packard and FedEx in the United States.

The MongoDB knowledge base that you are concerned about has been released, please follow it first, please click here =>>http://lib.csdn.net/base/mongodb



Tang Jianfa

CSDN Knowledge Base: Can you share your technological growth path.

Tang Jianfa: With many years of Java development experience, he is keen on open source. From the beneficiary of open source software to the provider of open source software to the current preacher, open source software has accompanied the development of the technology field.

CSDN Knowledge Base: What is the difference between Mongodb and traditional relational databases? What is the biggest advantage?

Tang Jianfa: Compared with the relational data model of RDBMS, MongoDB uses JSON as its data model, which is very close to the object model familiar to programmers. MongoDB allows developers to save the tedious database design process and significantly shorten the product development cycle. The operation of the database no longer requires a special language, but is called by the API, which is very popular for developers.

MongoDB has been a distributed database from the beginning. Its mature sharding technology allows users to easily scale to billions of data volumes and support hundreds of millions of users. Relatively speaking, the scalability of RDBMS is very limited. Even some sub-database and sub-table technologies require tedious operation and maintenance methods and application support, and the performance is often not guaranteed.

CSDN Knowledge Base: Can Mongodb perform complex query operations, and what are its outstanding performances?

Tang Jianfa: MongoDB is a NoSQL database that is closest in function to a traditional RDBMS. Supports most complex query operations, such as using secondary indexes for multiple field matching, in-array query, aggregation analysis, and even supports powerful MapReduce. In terms of performance, MongoDB has a very superior performance in concurrent writing and querying due to the use of asynchronous disk storage. Tests show that MongoDB can achieve 270,000 mixed read and write operations on a 20core server, and 95 percentile operations are returned within 10 milliseconds.

CSDN Knowledge Base: What are the sharding strategies of Mongodb, and what impact will different sharding strategies have?

Tang Jianfa: There are three sharding strategies for MongoDB: hash, range and tag. Hash has better support for data distribution and is suitable for scenarios with high write pressure and low read pressure. Range sharding is more suitable for range query scenarios that query a continuous segment of data at one time. Labels, on the basis of understanding the data distribution, customize the data distribution rules by themselves. Once a MongoDB shard key is set, it cannot be modified. Modifying the shard key requires exporting the full amount of data and importing it into the new cluster.

CSDN Knowledge Base: How does Mongodb store files (pictures, videos and audio) and how to improve the performance of reading and writing files?

Tang Jianfa: For small binary files (such as avatars or PDFs of several MB), you can directly store them in a JSON (BSON) document according to the binary fields. MongoDB additionally provides the GridFS API, which can be used to manage larger binary files. The GridFS API will automatically store large files in chunks, and automatically encapsulate them as source files when they are read back, reducing the amount of code in the program. If fast file read and write performance is required, MongoDB generally recommends:

Use separate physical volumes for data disks and Journal log
disks Use SSDs if possible, use
native direct-attached storage (DAS)
Use RAID to improve the IOPS of the storage system

CSDN Knowledge Base: How does Mongodb deal with high concurrency, high availability and data load balancing?

Tang Jianfa: MongoDB uses sharded clusters to deal with high concurrency, uses replica set technology to provide high availability, and provides routing nodes mongos to load balance data and requests. There is no single point of failure in the MongoDB architecture. All data nodes or configuration nodes are high-availability deployments with more than 3 nodes. MongoDB's replication technology supports various topologies, and even multi-center disaster recovery deployments can be easily built. Routing nodes are stateless nodes, and the number of routing nodes can be increased or decreased at any time according to system pressure (generally at least 2).

CSDN Knowledge Base: Can you share one or two domestic companies using Mongodb? What are their usage scenarios and the order of magnitude of their visits?

Tang Jianfa: In the Baidu Cloud project, MongoDB is used to store metadata information of files (file name, size, access time, path, etc.). The Baidu Cloud project has more than 300 million users, the number of MongoDB document entries exceeds 200 billion, and the total amount of data exceeds 2PB. Baidu has more than 100 MongoDB projects running on MongoDB clusters with thousands of nodes.

Eastern Airlines is using MongoDB in their most critical next-generation flight search program. According to the public sharing of China Eastern Airlines, the total number of their MongoDB database is billions, with 26 million writes and 45 million queries per day, 80% of the queries are less than 50ms, and the CPU utilization is less than 30%. These are just a set of A 3-node replica set is provided.

CSDN Knowledge Base: What is the future trend of Mongodb, and what challenges are still facing?

Tang Jianfa: MongoDB has recently increased its investment in the Chinese market. Internationally, top multinational financial institutions such as Citi, Barclays, Goldman Sachs, CapitalOne, etc. are adopting MongoDB on a large scale as the standard of their new generation database platform. Their common purpose is to reduce IT costs, improve team development efficiency, shorten the time from concept to market, quickly demonstrate business value, and improve competitiveness by improving customer experience.

The main challenge at present is that the domestic awareness of MongoDB is not enough, so that most of the time it is used in non-critical application scenarios.

CSDN Knowledge Base: What do you think about technical learning? We have launched the knowledge base systematic learning method, how would you use it?

Tang Jianfa: If you want to use MongoDB well, the first key is to abandon the inherent relational database thinking mode. Forget relational and consider the need for database capabilities from a business perspective. In terms of knowledge base, I hope to provide more articles and experience in application development combined with MongoDB, which may be more valuable for learning than sharing operation and maintenance knowledge.

Retrieved from: http://www.iteye.com/news/31925

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326530310&siteId=291194637