PlanetScale vs. Amazon RDS
By PlanetScale |
What is PlanetScale?
PlanetScale is a MySQL database platform built on top of Vitess, the popular open-source database management technology created at YouTube. Vitess enables horizontal sharding of MySQL abstracted from the application layer. It’s designed to improve database management and provide a performant, fault-tolerant database that can handle large workloads.
PlanetScale provides customers with the power of Vitess, offering a fully managed and performant MySQL database service with horizontal sharding, Git-like schema change workflows, automatic backup, recovery, advanced query analytics, and multi-region replication capabilities. PlanetScale can be deployed on multiple cloud platforms, including Amazon Web Services (AWS) and Google Cloud Platform (GCP).
What is Amazon RDS?
Amazon RDS (Relational Database Service) is a managed relational database service offered by Amazon Web Services (AWS). It supports several database engines including MySQL, PostgreSQL, MariaDB, Oracle, and Microsoft SQL Server. With RDS, users can set up, operate, and scale a relational database in the cloud. It facilitates and automates operational tasks like resource provisioning, patching, replication, and backups. It's designed to integrate well with other AWS native services.
Comparisons: PlanetScale vs. Amazon RDS
PlanetScale vs. Amazon RDS architecture and deployment
PlanetScale is MySQL-compatible and democratizes all of the data management and scalability features of Vitess. It's a highly scalable database platform with numerous tenancy and deployment options. Multi-tenant is the default tenancy for basic PlanetScale plans. Both multi-tenant and single-tenant deployments are available on PlanetScale Enterprise and Managed plans. PlanetScale Managed is a packaged data plane. It includes all compute, live data, and backups required to run the PlanetScale product inside of an AWS or GCP sub-account owned by the user.
Amazon RDS supports a number of commercially available and open-source software (OSS) database engines. It only supports AWS cloud infrastructure and is intentionally hyper-compatible with AWS tooling. Although RDS is a managed solution, users are still required to manually provision resources. This requires a level of knowledge about resource utilization and the user’s data model to provision correctly.
PlanetScale vs. Amazon RDS scale and performance
PlanetScale and Amazon RDS both approach database scale and performance in a different way. PlanetScale is built for high availability, performance, and scale. It’s able to handle bursts in traffic and heavy IOPS with ease, all while reducing the overhead associated with database management as a managed service. Amazon RDS was built to reduce database management overhead for users that would otherwise run and manage their database in EC2. Amazon RDS is the less performant managed relational database offering that AWS has. This is in comparison to Amazon Aurora, which Amazon claims is 5× faster than standard MySQL and more performant than RDS.
Both PlanetScale and RDS can scale horizontally, but the method differs in both solutions. PlanetScale horizontally shards your data abstracted from the application-layer. This is often a more performant, reliable, and cost-conscious way to shard MySQL. With RDS, users can horizontally scale read operations or add additional instances to distribute database operations to. Additionally, both PlanetScale and RDS users can vertically scale up instance size and resources to meet increased demand.
When a new MySQL node is added in PlanetScale, load balancing is automatically implemented. The way that PlanetScale load balances is possible because of a few Vitess components called VTTablet and VTGate as well as PlanetScale’s edge infrastructure. VTGate is an application-level query routing layer while VTTablet behaves as a middleware between VTGate and MySQL. This facilitates the flow of connections from the application, to a load balancer, to VTGate, to VTTablet, and then finally to MySQL. The VTTablet will manage connection pooling and perform health checks for MySQL instances, updating its status in a topo-server. Meanwhile, VTGate determines available tablets and their roles via the topo server and reroutes traffic as needed. PlanetScale’s edge infrastructure then acts as a frontend load balancer, terminating MySQL connections in the closest edge location.
Every single PlanetScale database gets all of this underlying infrastructure to ensure the database remains available. Load balancers will distribute traffic between the production branch and replicas as well as balance connections, IOPS, and resource usage.
With technically unlimited connections, PlanetScale is equipped to handle high concurrency. PlanetScale offers connection pooling, which scales with your cluster and enables connection requests to queue.
Amazon RDS does not automatically load balance. To manage an influx of connections, users can utilize the RDS Proxy to connection pool and reuse connections. This may increase latency, but will not lead to an application failure and will prevent overwhelming the database with too many connections.
PlanetScale vs. Amazon RDS pricing
PlanetScale costs are built for scale. With the paid tier starting at $39 per month with options for resource-based pricing, users can linearly grow their workload and infrastructure costs. PlanetScale Enterprise and Managed plans are completely custom and will cater to the user’s specific needs.
Amazon RDS is priced based on the type and sizes of compute nodes and the time that these resources are used for. There are options to pay based on usage, and options to reserve resources at a discounted rate. PlanetScale plans tend to be objectively cheaper on infrastructure than running on Amazon RDS. This is because PlanetScale right-sizes resources on many commodity-grade AWS EC2 instances, or the equivalent on other cloud providers, which prevents over provisioning and keeps cost in-line with the user’s actual workload. Additionally, users get more infrastructure with PlanetScale, including the immense power of Vitess, and a database cluster that provides the same if not greater fault tolerance than other commercial solutions.
PlanetScale vs. Amazon RDS operations
Both PlanetScale and Amazon RDS are managed database systems that aim to reduce complex database administration tasks. PlanetScale and RDS automate basic database operations and provide monitoring, logging, and auditing solutions.
PlanetScale provides users with production branches, which are highly available databases intended for production traffic. They are conceptually equivalent to the primary instance in other commercial databases. Production branches automatically failover to one of two default replicas to improve redundancy. The two replicas reduce the load on the primary branch, and enable users to scale read and write operations. Additional replicas and read-only regions are configurable.
PlanetScale additionally offers built-in auditing and log retention, as well as integrations with popular third-party monitoring tools such as Datadog.
Amazon RDS integrates tightly with other AWS services, including Database Activity Streams for activity monitoring, AWS CloudTrail for auditing logs, and more. Similar to PlanetScale, replicas are utilized to distribute load across multiple nodes. Additional read replicas can be manually configured. Backups are automatically configured by default, with retention periods and backup windows manually defined by the user. Snapshots can be set up manually. RDS does not have an individual load balancer per database cluster. To distribute traffic between primary and replica instances, logic can be manually defined by the user at the application level to direct reads and writes to either instance. Failover is automatic to a standby in a different AZ.
While Amazon RDS is a managed solution, a common complaint about this service is that many users end up managing database operations manually. In contrast to PlanetScale, RDS does not automatically load balance or handle major version upgrades. It requires user input for backup windows and its managed services do not fine-tune cluster resources, create comprehensive disaster recovery plans, or design a horizontal sharding scheme unique to your data model.
PlanetScale vs. Amazon RDS change management
Database change management processes vary by team. Changes performed on the database are complex, as you risk irreversible data corruption and consistency issues. PlanetScale and Amazon RDS provide different methods to configure an environment to test these changes prior to pushing to production.
Additionally, with a Git-like workflow for change management and in combination with CI/CD tooling, PlanetScale makes it easy to build, test, and deploy database changes to production with minimal risk. Amazon RDS does not provide native tooling for schema changes, and does not support online schema changes or schema reverts.
Frequently Asked Questions
Is Amazon RDS the same as MySQL?
Amazon RDS is not the same as MySQL. MySQL is an open-source relational database management system (RDBMS). It is a database engine that is supported by services like RDS, and allows you to manage data in a relational structure.
Is PlanetScale the same as MySQL?
PlanetScale is a MySQL-compatible database platform. It's built on open-source Vitess, a middleware technology designed to scale and manage very large MySQL deployments. PlanetScale offers a managed database service that provides horizontal scaling of MySQL, multi-cloud deployments, and other features that enable high availability and make it easier to manage large-scale MySQL deployments. In addition to the improved tooling, scaling, and schema management offered, PlanetScale will soon introduce vector search and storage, which is not currently available in MySQL.
Is PlanetScale better than Amazon RDS?
PlanetScale is a fully-managed MySQL-compatible database platform that supports the growth of organizations of all sizes. It’s the only solution built on open-source Vitess, the technology that scaled YouTube to billions of monthly active users. Every single database spun up on PlanetScale gets all of the power of Vitess without having to implement and maintain it yourself.
PlanetScale is cloud-agnostic and supports multiple cloud platforms. It tends to be more cost-effective than many solutions. This is because of the commodity-grade instance types that PlanetScale uses to optimally serve a user’s unique workload. If you are curious what this might look like for your organization, talk to PlanetScale’s Solutions team.
On top of improved scale and performance, PlanetScale is built with CI/CD and database change management in mind. This mitigates the risk associated with changes made on stateful workloads. Additionally, while both solutions are managed, RDS users often complain about having to manually manage database operations while PlanetScale is fully-managed.
While “better” is subjective, as RDS does not provide the power, scale, portability, or cost-effectiveness of Vitess, PlanetScale is oftentimes viewed as the superior platform.
Who uses PlanetScale?
PlanetScale is used by hyper-growth organizations like Attentive, MyFitnessPal, Barstool Sports, and many more. It’s built for high availability, performance, and massive scale. It’s the solution for high performing companies with intensive workloads, equally great for users just getting started with a MySQL database, and can effectively support the workloads of everything in between.
What is the difference between Vitess and PlanetScale?
Vitess is the open-source middleware technology developed at YouTube in 2010. It is designed to horizontally shard MySQL abstracted from the application-layer, and generally improves the process of managing the database. As Vitess is open-source, organizations can implement and maintain it on their own. This is complex and requires a level of expertise about the technology that is sparse in the infrastructure world.
PlanetScale is the only solution that is built on Vitess and democratizes many of its features. Deploying a PlanetScale database is the easiest way to deploy Vitess in the cloud. With a PlanetScale database, you can horizontally shard MySQL, obtain unlimited connections, perform online schema changes, revert schema changes, and much more.
Additionally, PlanetScale was co-founded by one of the creators of Vitess, Sugu Sougoumarane. The PlanetScale team is also one of the top contributors to Vitess, employing several of the Vitess maintainers.