Professional Documents
Culture Documents
Top 10 Reasons To Choose Mysql For Next Generation Web Applications
Top 10 Reasons To Choose Mysql For Next Generation Web Applications
to Choose MySQL
for Next Generation
Web Applications
A MySQL Whitepaper
Table of Contents
Introduction.......................................................................................................................... 3
1. The leading Open Source Web Database ........................................................... 3
2. The leading Open Source Database in the Cloud ........................................... 5
3. MySQL 5.7, Yet Again the Best Release Ever ................................................... 6
4. Scaling with MySQL Replication, MySQL Router and MySQL Fabric .... 7
5. MySQL Cluster, Real-time in-memory Performance and High
Availability ......................................................................................................................... 11
6. The Best of Both Worlds: SQL AND NoSQL .................................................. 14
7. The Worlds Most Popular Open Source Database ..................................... 16
8. Lower TCO .................................................................................................................... 18
9. MySQL Enterprise Edition ..................................................................................... 20
10. Oracle and MySQL .................................................................................................. 21
Conclusion ........................................................................................................................ 22
Additional Resources ................................................................................................... 23
Introduction
Digital Transformation is profoundly impacting our lives and economy. Applications
such as Facebook, Twitter, LinkedIn and Booking.com have redefined expectations
for enterprise applications. Millennials expect information to be available on any
device at any time, to be searchable, personalized and social enabled. And new
entrants such as Uber and Airbnb are disrupting entire industries.
MySQL is the #1 open source database for Web-based applications, used by
Facebook, Twitter, YouTube and virtually all the largest Web properties and
successful startups. In this white paper, we will help you better understand how
MySQL can help you drive digital transformation initiatives delivering modern Web,
mobile and Cloud-based applications.
A typical day at Twitter sees over 500 million tweets, which means about
5,700 per second with MySQL. Twitter achieved in August 2013 a new World
record of 143,199 Tweets Per Second (TPS).
Over 6 billion hours of video are watched each month on YouTube. 300 hours
of video are uploaded every minute. When you watch a video, youre getting
data from MySQL. Anybody that tells you that MySQL does not scale
probably has not considered exactly how to solve the problem. declared
Mike Salomon, one of the original YouTube engineers
Yahoo!, LinkedIn, Ticketmaster and the vast majority of both established web
properties and startups choose to bet their business on MySQL, because
they find it to be the best platform available.
Moreover, engineers from Facebook, Google, LinkedIn, Twitter & Alibaba joined
forces to work on WebScaleSQL, a collaboration based on Oracles MySQL and
aimed at incorporating various changes and new features into MySQL addressing
needs arising from deploying the database in large-scale environments. As they
noted in their announcement in 20141 We aim to create a more integrated system of
knowledge-sharing to help companies leverage the great features already found in
MySQL 5.6, while building and adding more features that are specific to deployments
in large scale environments.
While most relational databases were designed several decades ago for complex
ERP-type applications, MySQL was designed and optimized for Web applications. As
new and different requirements emerged with the Internet, MySQL became the
platform of choice for web developers, and the default database for web-based
applications.
Since then, the performance, scalability, reliability, and ease of use of the worlds
most popular open source database, characteristics that made MySQL the #1 choice
for web applications, have continuously been improved. As the social web keeps
evolving, and leading web properties such as Facebook and Twitter are pioneering
new ways to make sense of a huge and constantly growing amount of data, MySQL
is also evolving to continue to be the premier choice for web-based applications. For
example Oracle delivered:
Native JSON support in MySQL 5.7, enabling you to seamlessly blend the
best of the Relational and Document paradigms in MySQL.
MySQL Router, which simplifies application development by intelligently
routing queries to MySQL databases for increased performance and uptime.
MySQL Fabric, an open source and extensible framework delivering High
Availability via automatic failure detection and failover, as well as scalability
through automated data sharding.
We will review the above innovations in more details in this white paper.
1
https://code.facebook.com/posts/1474977139392436/webscalesql-a-collaboration-to-build-uponthe-mysql-upstream/
MySQL 5.6 expanded MySQLs capabilities in all those key areas. As well see in the
next section, the latest MySQL 5.7 release delivered increased performance,
scalability & manageability, making it yet an even better choice for deployments both
in public and private clouds.
MySQL is probably one of the friendliest databases to be in the cloud because of
how nimble and agile it is. It is easy to put in the cloud.2
Hari Tatrakal, Director of Database Services,Live Nation Entertainment/Ticketmaster
In addition, MySQL has always been an extremely popular embedded database for
ISVs, and became a natural platform for them to deliver their applications in a
Software-as-a-Service model.
Finally, MySQL is the most popular database for OpenStack deployments.
Organizations can implement Database as a Service (DBaaS) with OpenStack and
2
https://diginomica.com/2015/10/30/oracle-openworld-2015-ticketmaster-talks-databasecomplexity-as-it-heads-for-mysql-cloud/#.VjoL4pd1GsZ
Enhanced Speed: In benchmark tests using SysBench Read-only PointSelects, at 1,024 connections, MySQL 5.7 delivered 1,600,000 queries per
second (QPS) -- 3x faster than MySQL 5.6.
Optimized InnoDB: New capabilities include increased performance and
concurrency, enhanced on-line operations, spatial indexes, native partitioning
and more.
More Robust Replication: Enhancements to MySQLs replication features
include multi-source replication, enhanced Global Transaction Identifiers
(GTIDs), and improved multi-threaded slaves for better scalability and
availability.
Enhanced Optimizer: A new MySQL optimizer dynamic cost model provides
better query performance and greater user control.
New Native JSON Data Type and JSON Functions: Allows for efficient and
flexible storage, search and manipulation of schema-less data.
Enhancements include a new internal binary format, support for easy
integration within SQL, and index management on the JSON Documents
using generated columns.
Performance Schema: Enables instrumentation for memory, transactions,
stored routines, prepared statements, replication and locks.
MySQL SYS Schema: Provides helper objects that answer common
performance, health, usage and monitoring questions.
Improved Security: Delivers easier and safer instance initialization, setup
and management.
Expanded Geographic Information System (GIS) Support for Mobile
Applications: Provides spatial index support in InnoDB, GeoJSON and
GeoHash support.
MySQL Replication
One of the ways many new applications achieve scalability is via replicating
databases across multiple commodity nodes in order to distribute the workload.
Replication is a standard and integrated component of MySQL, providing the
foundation for extreme levels of database scalability and high availability in leading
web properties, including some of the worlds most highly trafficked Web sites.
Replication enables MySQL to copy changes from one instance to another (i.e. from
the master to one or more slave instances). This is used to increase both the
3
https://www.oracle.com/corporate/pressrelease/mysql-5-7-ga-101915.html
Multi-Source Replication
MySQL 5.7 adds intra-schema multi-threaded slaves. With this implementation the
slave will be able to apply transactions in parallel, even within a single database or
schema, as long as they have a disjoint read and write set. This work allows the
slave to keep up with the master, thus eliminating the most common cause of slave
lag.
You can now enable Global Transaction ID based replication as an online operation,
allowing you to take advantage of next generation replication features without
incurring downtime in your MySQL production environments.
The Semi-Sync replication plugin has improved semantics that provide better
performance and reliability.
MySQL Router
MySQL Router is lightweight middleware that provides transparent routing between
your application and any backend MySQL Servers. It can be used for a wide variety
of use cases, such as providing high availability and scalability by effectively routing
database traffic to appropriate backend MySQL Servers. The pluggable architecture
also enables developers to extend MySQL Router for custom use cases.
Failover
Typically, a highly available MySQL setup consists of a single master and multiple
slaves and it is up to the application to handle failover, in case the MySQL master
becomes unavailable. Using MySQL Router, application connections will be
Copyright 2015, Oracle and/or its affiliates. All rights reserved.
MySQL Fabric provides high availability and database sharding for MySQL Servers
High Availability (HA) also goes beyond coping with failures - with always connected,
mobile apps and global services, the concept of a "maintenance window" where
system downtime can be scheduled is a thing of the past for most applications. It's
traditionally been the job of the application or the DBA to detect the failure and
promote one of the slaves to be the new master. Making this whole system Highly
Available can become quite complex and diverts development and operational
resources away from higher-value, revenue generating tasks.
For High Availability, MySQL Fabric will manage the replication relationships, detect
the failure of the master and automatically promote one of the slaves to be the new
master. This is all completely transparent to the application.
MySQL Fabric provides a simple and effective option for High Availability as well as
the option of massive, incremental scale-out. It does this without sacrificing the
robustness of MySQL and InnoDB; requiring major application changes or needing
your Dev Ops teams to move to unfamiliar technologies or abandon their favorite
tools.
For more information about MySQL Fabric, get the MySQL Fabric Product Guide.
If applications involve high volumes of write operations coupled with the need for
very low latency and 99.999% availability, it is worthwhile considering MySQL
Cluster.
10
11
JOIN operations down to the data nodes where they are executed locally and in
parallel, significantly reducing network hops and delivering up to 70x lower latency.
Referential integrity is maintained between tables with Foreign Keys which are
enforced on both the SQL and NoSQL APIs. Those tables can live in different
shards, and even in different data centers.
As a result of technologies such as AQL, MySQL Cluster can serve real-time
analytics across live data sets, along with high throughput OLTP operations.
Examples include recommendations engines and clickstream analysis in web
applications, pre-pay billing promotions in mobile telecoms networks or fraud
detection in payment systems, such as those used by PayPal who rely on MySQL
Cluster to protect nearly $150B of transactions per year.
Scaling Across Data Centers
Web services are global and developers want to ensure their databases can scaleout across regions. MySQL Cluster offers full active-active Geographic Replication,
allowing the same data to be accessed in clusters located in data centers
separated by arbitrary distances. This reduces the effects of geographic latency by
pushing data closer to the user, as well as providing a capability for geographic
redundancy and disaster recovery.
MySQL Cluster also offers Multi-Site Clustering, providing additional options for cross
data center scalability and fault tolerance. Data nodes can be split across data
centers with synchronous replication between them.
Whether you are replicating within the cluster, across data centers or between
storage engines, all replication activities are performed concurrently so users can
combine scaling and High Availability (HA) strategies.
http://dev.mysql.com/downloads/benchmarks.html
12
200,000,000
250,000,000
150,000,000
100,000,000
50,000,000
10
12
14
16
18
20
Data Nodes
These results demonstrate how users can build a highly performing, highly scalable
MySQL Cluster from low cost commodity hardware to power their most missioncritical web services.
http://www.mysql.com/why-mysql/benchmarks/mysql-cluster/
13
22
24
26
28
30
32
MySQL Cluster using the same memory-optimized tables that provide submillisecond low latency and extreme levels of concurrency for OLTP
workloads. These durable in-memory tables can be used in combination with
disk-based tables.
New geographic redundancy features for high availability across data
centers: The latest release provides rollback of any conflicting transactions,
enabling full active-active, update-anywhere replication between
geographically distant clusters, with applications able to send reads and
writes to any site without compromising on consistency.
Advanced management capabilities: MySQL Cluster for both on-premises
and cloud-based deployments features the following improvements:
o New reports on distributed memory use and database operations,
enabling more effective management;
o Additional performance tuning options;
o Faster online maintenance operations, including the ability to roll out
software upgrades as much as 5x faster.
The MySQL Cluster demo provides you with a 5 min overview of MySQL Cluster:
https://www.youtube.com/watch?v=A7dBB8_yNJI
14
Convenience - The additional inline syntax for JSON columns makes it very
natural to integrate Document queries within your SQL. For example
(features.feature is a JSON column):
SELECT feature->"$.properties.STREET" AS property_street FROM features
WHERE id = 121254;
With MySQL 5.7, you can now seamlessly blend the best of the Relational and
Document paradigms in a single tool, using whatever is best for each specific
application and use case. This opens up a tremendous number of new use cases for
MySQL users.
Oracle had also implemented NoSQL interfaces directly to the InnoDB and MySQL
Cluster (NDB) storage engines, which bypass the SQL layer completely. Without
SQL parsing and optimization, Key-Value data can be written directly to MySQL
tables up to 9x faster, while maintaining ACID guarantees. In addition, users can
continue to run complex queries with SQL across the same data set.
With the Memcached daemon running in the same process space, users get very low
latency access to their data while also leveraging the scalability enhancements
delivered with InnoDB and a simple deployment and management model. Multiple
web / application servers can remotely access InnoDB tables via the memcached
API to get direct access to a shared data set.
With simultaneous SQL access, users can maintain all the advanced functionality
offered by InnoDB including support for Foreign Keys, Full Text Search, and complex
JOIN operations.
15
16
Product Maturity
MySQL is a proven and mature solution. It has evolved over the years benefitting
from feedback from a huge number of developers and DBAs - relying on it for the
most demanding Web applications in the world, pushing its limits, and contributing in
a number of ways to the performance, reliability and ease of use of MySQL.
Blogs from engineering managers at successful Web properties such as Pinterest
and Etsy have highlighted the wisdom of selecting proven and mature technologies,
whether for new startups or projects:
https://blogs.oracle.com/MySQL/entry/on_choosing_mature_technologies
Oracle Linux
Oracle VM
Oracle Enterprise Manager
Oracle GoldenGate
Oracle Secure Backup
Oracle Audit Vault & Database Firewall
Oracle Fusion Middleware
Oracle Clusterware
Oracle OpenStack for Oracle Linux
MyOracle Online Support
17
MySQL has been battle tested in such a wide variety of use cases that it is
very likely someone else (or many actually) already faced the same issue you
are or will be confronted by. You will therefore easily be able to get help
online and find the answer to your questions.
Various extensions, driversetc have been developed for MySQL and are at
your disposal.
New features and releases are exposed to millions of eye balls, in front of
which all bugs are shallow6. They therefore mature faster to a reliable
production quality.
Beyond its technical merits, the MySQL ecosystem therefore represents another
crucial benefit to MySQL users, and offers additional reasons to rely on the worlds
most popular open source database.
8. Lower TCO
By selecting MySQL for their web-based applications, startups and established
corporations alike are realizing significant cost savings. Accomplished through the
use of the MySQL database and scale-out architectures that utilize low-cost
commodity hardware, organizations are finding that they can achieve very high
levels of scalability, availability and performance, while significantly lowering their
Total Cost of Ownership. In addition, the reliability and manageability of MySQL
means that database administrators don't waste time troubleshooting performance
or availability issues, but instead can concentrate on making a positive impact by
focusing on higher level and more strategic tasks.
Below is a chart which compares the 3 year database TCO of MySQL Enterprise
Edition vs. Microsoft SQL Server 2012 Enterprise Edition.
18
$60,000
$200,000
$0
MySQL Enterprise Edition
Microsoft SQL Server
Enterprise Edition
Hardware Configuration:
Intel x86_64 Servers: 4, CPUs/Server: 4, Cores/CPU: 8
Microsoft Price Increases
Microsoft increased prices of Microsoft SQL Server 2012 for customers who want to take advantage of the latest
multi-core hardware. Microsoft SQL Server 2012 is licensed Per Core.
Microsoft SQL Server vs. MySQL: 3 Year Database TCO
The table below presents a simple comparison of licensing costs between MySQL Enterprise Edition and
Microsoft SQL Server Enterprise Edition. Pricing is based on publicly available list price information:
Microsoft
http://www.microsoft.com/sqlserver/en/us/future-editions/sql2012-licensing.aspx
MySQL Enterprise Edition:
http://www.mysql.com/products/
Hardware Configuration:
- Web application (Unlimited Users)
- Windows
- Intel x86_64
- CPUs/Server: 4
- Cores/CPU: 8
- Total Servers: 4
- Total CPUs: 16
- Total Core: 128
List Prices
Microsoft SQL Server Enterprise Edition
MySQL Enterprise Edition
License + 3 Year Support
3 Year Subscription
License List Price
$6,874/Core
N/A
Support List Price
25% of List Price
N/A
Subscription List Price
N/A
$5,000/Server/Year
Annual Savings
Annual Support
Annual Subscriptions
Annual Savings ($)
Annual Savings (%)
N/A
$20,000
$199,968
91%
19
N/A
N/A
$60,000
$60,000
$1,479,766
96%
You can customize Oracles MySQL TCO Savings Calculator with your system
configuration at: http://www.mysql.com/tcosavings/
Oracle Premier Support for MySQL: Staffed with MySQL Experts, Oracles
dedicated MySQL technical support team can help you solve your most
complex issues rapidly, and make the most of your MySQL deployments.
Oracle MySQL Support Engineers are available 24/7/365 either online or by
phone, and have direct access to the MySQL developers. Oracle Premier
Support does not include any limit on the number of support incidents, and
you get support in 29 languages. Additionally, Oracle Premier Support
includes consultative support, a proactive approach designed to help you
avoid critical outages. MySQL Support Engineers advise you on how to
properly setup and tune your MySQL servers, schema, queries, and
replication set-up to maximize performance and availability. And by taking the
initiative to properly design and tune your MySQL database applications you
can avoid having to purchase expensive hardware for your IT infrastructure.
MySQL Enterprise Backup: Reduces the risk of data loss by delivering
online "Hot" backups of your databases.
MySQL Enterprise Monitor: The MySQL Enterprise Monitor and the MySQL
Query Analyzer continuously monitor your databases and alert you to
potential problems before they impact your system. It's like having a "Virtual
DBA Assistant" at your side to recommend best practices to eliminate security
vulnerabilities, improve replication, optimize performance and more. As a
result, the productivity of your developers, DBAs and System Administrators
is improved significantly.
MySQL Enterprise Scalability: Enables you to meet the sustained
performance and scalability requirements of ever increasing user, query and
data loads. MySQL Thread Pool provides an efficient, thread-handling model
designed to reduce overhead in managing client connections, and statement
execution threads.
20
Check out the MySQL Enterprise Edition demo to get a 5 min overview:
https://www.youtube.com/watch?v=IYcsc9g2mdI
MySQL Cluster CGE includes all of the above plus MySQL Cluster Manager, which
simplifies the creation and administration of the MySQL Cluster CGE database by
automating common management tasks, including on-line scaling, upgrades and
reconfiguration.
Additional MySQL Services from Oracle to help you develop, deploy and manage
highly scalable & available MySQL applications include an extensive range of
MySQL training courses (http://www.mysql.com/training/) and certifications
(http://www.mysql.com/certification/) from Oracle University and MySQL Consulting
Services (http://www.mysql.com/consulting/).
21
Additionally, Oracle is integrating MySQL with all relevant Oracle solutions, as noted
earlier in this document.
For organizations relying on MySQL, Oracles ownership and investment in MySQL
represents excellent news at multiple levels:
The performance, scalability reliability and security of MySQL has never been
better than it is now, and keeps improving thanks to Oracles investment in
MySQL
Oracles MySQL Enterprise Edition includes the tools, support services and
indemnification provisions enabling you to safely and cost-effectively deploy
MySQL
You get all the benefits of the worlds most popular open source database,
delivered to you by the #1 database company.
Conclusion
In this whitepaper weve reviewed the top 10 reasons to choose MySQL for next
generation Web-based applications.
With ever-increasing data volumes, developers, DBAs and DevOps managers are
looking to build modern web, cloud-based and embedded applications exhibiting high
performance, scalability and manageability while maintaining the highest levels of
reliability and data integrity. MySQL allows them to precisely do so, without tradeoffs.
Oracle drives MySQL Innovation and keeps extending the worlds most popular open
source database capabilities to ensure it will continue to represent the best platform
available for modern Web-based applications enabling digital transformation.
22
Additional Resources
MySQL Whitepapers
http://www.mysql.com/why-mysql/white-papers/
MySQL Webinars:
Live: http://www.mysql.com/news-and-events/web-seminars/index.html
On Demand: http://www.mysql.com/news-and-events/on-demand-webinars/
MySQL Enterprise Edition Demo:
https://www.youtube.com/watch?v=IYcsc9g2mdI
MySQL Cluster Demo:
https://www.youtube.com/watch?v=A7dBB8_yNJI
MySQL Enterprise Edition Trial:
http://www.mysql.com/trials/
MySQL Case Studies:
http://www.mysql.com/why-mysql/case-studies/
MySQL TCO Savings Calculator:
http://mysql.com/tco
To contact an Oracle MySQL Representative:
http://www.mysql.com/about/contact/
23