mysql存储引擎InnoDB 1.1、NDB 7.5对比

本文对比了MySQL的NDB和InnoDB两个存储引擎,详细探讨了它们在分布式架构、工作负载、特性使用上的差异,帮助读者理解两者在高可用性、故障切换、吞吐量和延迟等方面的不同表现,以及适用于不同应用需求的特点。

mysql存储引擎InnoDB 1.1、NDB 7.5对比

官网针对NDB和InnoDB进行了多方位的对比:

Differences Between the NDB and InnoDB Storage Engines

https://dev.mysql.com/doc/refman/5.7/en/mysql-cluster-ndb-innodb-engines.html

The NDB storage engine is implemented using a distributed, shared-nothing architecture, which causes it to behave differently from InnoDB in a number of ways. For those unaccustomed to working with NDB, unexpected behaviors can arise due to its distributed nature with regard to transactions, foreign keys, table limits, and other characteristics. These are shown in the following table:

Feature

InnoDB 1.1

NDB 7.5

MySQL Server Version

5.7

5.7

InnoDB Version

InnoDB 5.7.20

InnoDB 5.7.20

NDB Cluster Version

N/A

NDB 7.5.8

Storage Limits

64TB

128TB (as of NDB 7.5.2)

Foreign Keys

Yes

Yes

Transactions

All standard types

READ COMMITTED

MVCC

Yes

No

Data Compression

Yes

No (NDB checkpoint and backup files can be compressed)

Large Row Support (> 14K)

Supported for VARBINARY,VARCHARBLOB, and TEXTcolumns

Supported for BLOB and TEXT columns only (Using these types to store very large amounts of data can lower NDB performance)

Replication Support

Asynchronous and semisynchronous replication using MySQL Replication

Automatic synchronous replication within an NDB Cluster; asynchronous replication between NDB Clusters, using MySQL Replication

Scaleout for Read Operations

Yes (MySQL Replication)

Yes (Automatic partitioning in NDB Cluster; NDB Cluster Replication)

Scaleout for Write Operations

Requires application-level partitioning (sharding)

Yes (Automatic partitioning in NDB Cluster is transparent to applications)

High Availability (HA)

Requires additional software

Yes (Designed for 99.999% uptime)

Node Failure Recovery and Failover

Requires additional software

Automatic (Key element in NDB architecture)

Time for Node Failure Recovery

30 seconds or longer

Typically < 1 second

Real-Time Performance

No

Yes

In-Memory Tables

No

Yes (Some data can optionally be stored on disk; both in-memory and disk data storage are durable)

NoSQL Access to Storage Engine

Yes

Yes (Multiple APIs, including Memcached, Node.js/JavaScript, Java, JPA, C++, and HTTP/REST)

Concurrent and Parallel Writes

Not supported

Up to 48 writers, optimized for concurrent writes

Conflict Detection and Resolution (Multiple Replication Masters)

No

Yes

Hash Indexes

No

Yes

Online Addition of Nodes

Read-only replicas using MySQL Replication

Yes (all node types)

Online Upgrades

No

Yes

Online Schema Modifications

Yes, as part of MySQL 5.7

Yes


NDB Cluster has a range of unique attributes that make it ideal to serve applications requiring high availability, fast failover, high throughput, and low latency. Due to its distributed architecture and multi-node implementation, NDB Cluster also has specific constraints that may keep some workloads from performing well. A number of major differences in behavior between the NDB and InnoDB storage engines with regard to some common types of database-driven application workloads are shown in the following table::

Workload

InnoDB

NDB Cluster (NDB)

High-Volume OLTP Applications

Yes

Yes

DSS Applications (data marts, analytics)

Yes

Limited (Join operations across OLTP datasets not exceeding 3TB in size)

Custom Applications

Yes

Yes

Packaged Applications

Yes

Limited (should be mostly primary key access)

NDB Cluster 7.5 supports foreign keys

In-Network Telecoms Applications (HLR, HSS, SDP)

No

Yes

Session Management and Caching

Yes

Yes

E-Commerce Applications

Yes

Yes

User Profile Management, AAA Protocol

Yes

Yes

When comparing application feature requirements to the capabilities of InnoDB with NDB, some are clearly more compatible with one storage engine than the other.

The following table lists supported application features according to the storage engine to which each feature is typically better suited.

Preferred application requirements forInnoDB

Preferred application requirements for NDB

  • Foreign keys

    Note

    NDB Cluster 7.5 supports foreign keys

  • Full table scans

  • Very large databases, rows, or transactions

  • Transactions other than READ COMMITTED

  • Write scaling

  • 99.999% uptime

  • Online addition of nodes and online schema operations

  • Multiple SQL and NoSQL APIs (see NDB Cluster APIs: Overview and Concepts)

  • Real-time performance

  • Limited use of BLOB columns

  • Foreign keys are supported, although their use may have an impact on performance at high throughput


参考资料:

https://dev.mysql.com/doc/refman/5.7/en/mysql-innodb-cluster-userguide.html

https://dev.mysql.com/doc/refman/5.7/en/mysql-innodb-cluster-introduction.html

https://dev.mysql.com/doc/refman/5.7/en/mysql-cluster-compared.html

https://dev.mysql.com/doc/refman/5.7/en/mysql-cluster-ndb-innodb-engines.html

https://dev.mysql.com/doc/refman/5.7/en/mysql-cluster-ndb-innodb-workloads.html

https://dev.mysql.com/doc/refman/5.7/en/mysql-cluster-ndb-innodb-usage.html




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值