Blogs
PlanetScale logo

PlanetScale

Engineering blog · planetscale.com/blog

279posts3this week0watchers

Feature trails

61
Feature trailActive

Postgres Full-Text Search (TIN)

PlanetScale offers TIN, a high-performance full-text search extension for PostgreSQL. This post details updates including stemming support for 18 languages, improved tiebreaker handling in top-k queries, and optimizations that restore TIN's performance lead over competitors like ParadeDB, particularly in concurrent write scenarios. The benchmarks highlight TIN's speed advantage on both x86-64 and ARM64 architectures, with specific performance metrics provided for conjunction, disjunction, and phrase queries. The post also discusses the trade-off of omitting common terms from BM25 scoring by default and how to tune this behavior.

5 posts · 2022–2026

Timeline

20222026
Feature trailActive

Database Traffic Control

PlanetScale offers enhanced database traffic control by allowing users to attach resource budgets to specific slices of Postgres traffic, enabling isolation of critical flows from resource-intensive operations. This feature also provides mechanisms for managing background jobs and routing connections to the nearest read replica globally through a dedicated PlanetScale Global Network. This network acts like a CDN for database connectivity, terminating connections at the edge, pooling them, and ro

14 posts · 2022–2026

Timeline

20222026
Feature trailActive

Global Read-Only Regions

PlanetScale Portals allows users to create read-only regions for their databases in various global locations. This feature aims to reduce read latency for globally distributed applications by placing data closer to users. Users can add multiple read-only regions to their existing databases, connecting to them via specific connection strings. The system supports automatic role switching in frameworks like Ruby on Rails to direct reads to the nearest replica and writes to the primary, while also i Dedicated read replicas are additional Postgres instances that replicate asynchronously from the primary cluster. This allows for reducing read latency for a global set of clients by standing up replicas in different data centers. Users can also create multiple dedicated read replicas within the same region to isolate specific workloads like vector search or analytics from the primary OLTP traffic. Each replica can be individually sized and configured with specific RAM, latency, and performance characteristics, including instance size and disk characteristics.

2 posts · 2022–2026

Timeline

20222026
Feature trailActive

Neki Query Performance

Neki, PlanetScale's sharded Postgres solution, continues to evolve its architecture. This post details optimizations in query processing by minimizing unnecessary data decoding and serialization. The router now selectively decodes only required columns and parameters, and preserves original PostgreSQL wire formats where possible. This lazy and composable approach reduces network hops and processing overhead, especially for point lookups, queries with LIMIT, and cross-shard queries where full row decoding is not required. For sorting operations, specific sort keys are decoded as needed. The system also leverages protocol-level optimizations for bind parameters and column frames, and maintains original formats for text/binary data to further reduce processing.

32 posts · 2022–2026

Timeline

20222026
Feature trailActive

CPU Architecture Selection for Databases

PlanetScale offers users the choice between x86-64 and aarch64 CPU architectures for their database clusters, impacting performance and cost. This feature allows users to select the optimal architecture based on their workload characteristics, such as query concurrency, single-core performance needs, and vector processing requirements. Migrating between architectures requires a full database migration.

1 post · 2026

Timeline

Feature trailActive

Postgres High Availability with CDC

PlanetScale offers robust database replication solutions for MySQL and Postgres, focusing on high availability and data consistency. For MySQL, best practices include active/passive configurations, using GTIDs for transaction tracking, semi-synchronous replication for enhanced consistency with configurable timeouts, and optimizing log storage. The platform emphasizes proactive monitoring and a clear failover strategy. For cross-datacenter replication, asynchronous mode is recommended due to late This post details how PlanetScale's custom Kubernetes operator enhances Postgres high availability by actively managing logical replication slots during cutovers. It explains the importance of `failover = true` for logical slots to ensure they are synchronized with replicas, preventing data loss for downstream consumers. The operator detects misconfigurations, alerts users, and blocks planned cutovers that would compromise replication slot integrity. It also manages `synchronized_standby_slots` to prevent a single dead replica from blocking all logical replication. The post also clarifies the trade-offs of enabling `hot_standby_feedback` and `sync_replication_slots`.

6 posts · 2020–2026

Timeline

20202026
Feature trailActive

Database Connection Management

PlanetScale offers enhanced database connection management tools for Postgres and MySQL, including dashboard and CLI commands to inspect and terminate connections. This feature aims to prevent and resolve database downtime caused by unhandled exceptions, open transactions, and schema change locks. The post details how connection poolers like PgBouncer can lead to 'poisoned' pools due to stale session states, causing write errors. It introduces `DISCARD ALL` as a quick fix and recommends using `i` PgBouncer for all application traffic, with options for local, dedicated primary, and dedicated replica PgBouncers. The post details configuration options like `max_client_conn`, `default_pool_size`, `max_db_connections`, and `max_user_connections`, and provides tuning examples for small and large servers, as well as single-tenant configurations, to optimize connection pooling and prevent exceeding PostgreSQL's `max_connections`.

13 posts · 2021–2026

Timeline

20212026
Feature trailActive

Postgres Memory Management

Postgres memory management focuses on understanding the difference between cache and process memory (RSS). High cache usage is good, indicating data is readily available to the CPU. High RSS, however, signifies memory pressure and potential OOM risks. The post details how to investigate performance degradation by correlating Cluster Metrics, Query Insights, and EXPLAIN (ANALYZE, BUFFERS, MEMORY) to identify the root cause of RSS growth, emphasizing efficient connection pooling as a key strategy to reduce RSS.

1 post · 2026

Timeline

Feature trailActive

Postgres Backup and Recovery

PlanetScale offers robust database backup and recovery solutions, leveraging Vitess for sharding to enable parallelized backups and restores. This significantly reduces backup times for large databases and speeds up recovery processes. The system handles the complexities of backup scheduling, execution, and storage, providing users with a reliable snapshot of their data. Backups are also crucial for efficient replica creation and data recovery scenarios. This post adds considerations for building and operating backups with sharding, detailing the parallelization benefits and trade-offs in catch-up replication.

4 posts · 2024–2026

Timeline

20242026
Feature trailActive

Postgres Core Space Reclamation

Postgres core space reclamation now includes an online REPACK command, similar to pg_squeeze, allowing tables to be rewritten to reclaim space from dead tuples without locking the table for reads and writes. This feature requires logical decoding and has specific compatibility requirements. Additionally, JIT compilation is disabled by default in Postgres 19, and the query planner has improvements like eager aggregation and faster NOT IN clauses. Other changes include LZ4 as the TOAST default, logging of lock waits, faster foreign-key inserts, wider MultiXact offsets, parallel autovacuum, new SQL features, and property graphs.

6 posts · 2026

Timeline

Feature trailActive

Logical Databases and Role Management

PlanetScale Postgres now supports creating and managing multiple logical databases within a single database cluster. This allows for better isolation of schemas and data for different applications, such as side projects, within a shared infrastructure. The platform provides tools and guidance for automating the creation of logical databases and their associated roles, including managing permissions at the database and schema level to enforce the principle of least privilege. This capability aims to simplify multi-application deployments on a single cluster, especially for development and testing environments, while also offering guidance on when to scale to dedicated clusters for production workloads.

1 post · 2026

Timeline

Feature trailActive

Kubernetes Control Loops

PlanetScale leverages Kubernetes to manage database clusters, extending its control loop capabilities with a Vitess Operator for stateful workloads. This automates deployment, storage management, backup processes, and failure mitigation, ensuring high availability and resilience. The system handles pod/container failures and AZ outages, with databases distributed across multiple availability zones for fault tolerance. Replicas are also stored in separate AZs, and automatic failover to a replica. This post details the fundamental concepts of control loops and how they are implemented in Kubernetes operators for managing stateful systems like databases.

5 posts · 2022–2026

Timeline

20222026
Feature trailActive

Database Egress Optimization

PlanetScale offers enhanced database egress optimization by integrating with DuckDB and supporting Change Data Capture (CDC) via Vitess's VStream API. This enables building data pipelines for analytics, data warehousing, and integration with other systems. The VStream API, exposed through VTGates, provides a unified change stream across sharded Vitess clusters, which can be consumed by tools like Debezium, Airbyte, and Fivetran, or directly via a gRPC client. This facilitates real-time data replication and enables building data pipelines for analytics, data warehousing, and integration with other systems.

6 posts · 2022–2026

Timeline

20222026
Feature trailActive

Database Benchmarking Best Practices

PlanetScale Insights provides automated schema recommendations and query monitoring tools to improve database performance, reduce memory and storage usage, and enhance schema design. This post highlights how these tools were used to detect and resolve slow queries in the Arewefastyet benchmarking tool, resulting in an 85% decrease in query latency by adding missing indexes. The new error tracking feature in Insights helps users quickly view and understand database errors, enabling faster trouble. This post adds index usage tracking to Insights, allowing users to see which indexes are used by specific query patterns over time and to search for queries by index usage or lack thereof.

20 posts · 2021–2026

Timeline

20212026
Feature trailActive

Row Level Security (RLS) Management

This post introduces Row Level Security (RLS) in PostgreSQL, highlighting its potential benefits for managing data access at the database layer. However, it primarily focuses on the significant challenges and complexities associated with implementing and scaling RLS effectively. The post details issues related to policy management, connection pooling with tools like PgBouncer, attack surface amplification due to unmitigated query execution, performance implications of row-level policy evaluation, and bypassing RLS via superuser roles or table ownership. It suggests alternative patterns like SECURITY DEFINER functions and emphasizes managing security at the application layer.

1 post · 2026

Timeline

Feature trailActive

HTAP Database Concepts

PlanetScale offers a managed Postgres service optimized for OLTP workloads. This post clarifies multi-tenancy approaches, recommending shared-schema for scalability and simplicity, detailing tenant modeling, filtering, and optimization. It also briefly touches on schema-per-tenant and database-per-tenant as less scalable alternatives. The post also explains MySQL partitioning, its benefits (query optimization, maintenance operations), drawbacks (data type limitations, unbalanced partitions), and.

3 posts · 2023–2026

Timeline

20232026
Feature trailActive

Postgres as a Real-time Messaging Backend

PlanetScale offers a managed Postgres service that can be used as a real-time message broker. This post explores using logical replication to stream data, such as video frames and audio, from database tables to connected clients. The implementation involves a SvelteKit frontend, a Node.js WebSocket server for relaying messages, and PostgreSQL for durable storage and real-time distribution. The post also discusses alternative approaches like LISTEN/NOTIFY and unlogged tables, and demonstrates how to manage accumulating rows with cleanup jobs and how to keep audio in sync with clamping.

1 post · 2026

Timeline

Feature trailActive

Cloudflare Workers Integration

PlanetScale offers a native integration with Cloudflare Workers, enabling seamless connection to PlanetScale databases (Postgres and MySQL/Vitess). This integration leverages Cloudflare's Hyperdrive for connection pooling and caching, bringing database closer to users with edge caching and reducing latency. It aims to improve setup speed, performance, and reliability for globally distributed applications. This post details how the integration simplifies connecting Netlify applications to PlanetS

2 posts · 2023–2026

Timeline

20232026
Feature trailActive

AI Model Context Protocol (MCP) Server

PlanetScale is introducing an MCP server that allows AI tools to connect to the PlanetScale API, exposing organizations, databases, branches, schema, and Insights data. This enables AI tools to assist with database optimization, query analysis, natural language data querying, and debugging by providing direct access to database metadata and performance metrics. The MCP server includes configurable access permissions, built-in safeguards for query execution (replica routing, ephemeral credentials, destructive query protection, and human confirmation for DDL).

1 post · 2026

Timeline

Feature trailActive

Database Transactions

PlanetScale offers robust transaction management for databases, building upon ACID compliance principles. This includes support for foreign key constraints in unsharded databases, enabling referential integrity while maintaining features like branching and non-blocking schema changes. The system also supports importing existing databases with FKs and provides careful consideration for potential performance degradation. The core of transaction management in PlanetScale is built on the underlying Vitess system, which provides mechanisms for distributed transactions and consistency across shards. The post details how Postgres and MySQL handle transactions, including multi-versioning in Postgres and undo logs in MySQL, and discusses isolation levels (Serializable, Repeatable Read, Read Committed, Read Uncommitted) and their tradeoffs in terms of performance and phenomena like phantom reads, non-repeatable reads, and dirty reads. It also touches on concurrent writes and locking mechanisms.

11 posts · 2020–2026

Timeline

20202026
Feature trailActive

DuckDB Integration for Analytics

PlanetScale now supports the pg_duckdb extension, allowing users to run DuckDB analytics queries directly within their PlanetScale Postgres databases. This enables seamless integration of OLTP and OLAP workloads, with the option to offload query execution to MotherDuck's cloud data warehouse. This feature simplifies data movement and unifies the experience of combining analytics results with relational data.

1 post · 2025

Timeline

20252026
Feature trailActive

PlanetScale Metal for Postgres Pricing and Sizing

PlanetScale Metal offers enhanced database performance and cost-effectiveness by utilizing local NVMe drives instead of network-attached storage. This provides significantly higher IOPS and lower, more consistent latency, making it ideal for high-I/O workloads and reducing the need for read replicas. Durability is maintained through semi-synchronous replication across three availability zones and daily, tested backups. Metal is available in AWS and GCP, with pricing that is often more competitive.

8 posts · 2025

Timeline

20252026
Feature trailActive

Vitess Release Management

Vitess 20 enhances query compatibility with improved DML support, Vindex hints, and advanced sharded update/delete operations. VReplication gains experimental multi-tenant import capabilities. Online DDL sees improvements in enum reordering, instant DDL prediction, range partitioning, and VDiffs on in-progress workflows, while dropping support for gh-ost. The Vitess Operator introduces experimental automated and scheduled backups.

23 posts · 2020–2025

Timeline

20202026
Feature trailActive

Vitess-based MySQL replacement

PlanetScale offers a managed Vitess service, abstracting the complexities of self-hosting Vitess. This includes handling the significant time, resources, and expertise required for implementation, migration, operational processes (provisioning, service discovery, backup/restore, topology management), application integration, and ongoing maintenance. The managed service aims to simplify the use, operation, and maintenance of Vitess and MySQL at scale, providing features like database branching and sharding. This post details how sharding MySQL databases can lead to minimized impact from failures, more efficient maintenance tasks, and potential cost savings through horizontal scaling and utilization of commodity disks.

21 posts · 2020–2025

Timeline

20202026
Feature trailActive

Incident Response and Resilience

PlanetScale leverages Kubernetes to manage database clusters, extending its control loop capabilities with a Vitess Operator for stateful workloads. This automates deployment, storage management, backup processes, and failure mitigation, ensuring high availability and resilience. The system handles pod/container failures and AZ outages, with databases distributed across multiple availability zones for fault tolerance. Replicas are also stored in separate AZs, and automatic failover to a replica. This post details the principles of extreme fault tolerance, including isolation, redundancy, and static stability, applied to their architecture (control and data planes, database clusters) and processes (always failing over, synchronous replication, progressive delivery) to mitigate non-query-path, cloud provider (instance, zonal, regional), and PlanetScale-induced failures.

5 posts · 2020–2025

Timeline

20202026
Feature trailActive

Postgres I/O Method Benchmarking

This post benchmarks the new I/O method configurations in PostgreSQL 18 (`worker` and `io_uring`) against the default `sync` method from PostgreSQL 17. It analyzes performance across various EC2 instance types with different storage configurations (gp3, io2, local NVMe) and concurrency levels using the `sysbench oltp_read_only` workload. The findings highlight that local NVMe drives offer superior price-performance, and while `io_uring` shows promise, `worker` often provides a better balance of performance and flexibility, especially on network-attached storage.

1 post · 2025

Timeline

20252026
Feature trailCooling

Vector Indexing for Relational Databases

PlanetScale offers GA support for vector search and storage within MySQL, making vectors a first-class part of the RDBMS. This includes relational indexing for vectors, allowing them to be stored in columns, indexed with `ALTER` or `CREATE VECTOR INDEX` statements, and queried with standard SQL `JOIN` and `WHERE` clauses within transactions. All PlanetScale features, such as branching, deploy requests, and backups, are supported. The system offers multiple distance metrics (Euclidean, inner product, cosine), supports up to 16,383 dimensions, and includes fixed and product quantization. A key innovation is the integration of SPANN (Space-Partitioned Approximate Nearest Neighbors), enabling indexes larger than RAM by combining partition-based and tree-based approaches. This allows efficient operation with vector data up to 6x bigger than available memory, with performance benefits amplified on PlanetScale Metal.

5 posts · 2023–2025

Timeline

20232026
Feature trailCooling

Process and Thread Management

This series explores consensus algorithms, focusing on durability at scale. Part 1 introduces the core problems consensus algorithms solve: distributed durability, availability, and automation. It emphasizes the need for flexible algorithms that can adapt to complex cloud provider topologies and pricing structures, contrasting this with rigid traditional algorithms like Paxos and Raft. The approach taken is engineering-focused, using terminology and an objective-based, top-down methodology to id This post introduces the fundamental concepts of processes and threads as operating system abstractions for executing code and managing resources. It explains how processes enable multitasking by allowing the CPU to switch between different programs, detailing context switching, process states, and the system calls fork() and execve() for process creation. The post also contrasts this with threads, highlighting their lighter weight and shared memory space, setting the stage for understanding different concurrency models.

1 post · 2025

Timeline

20252026
Feature trailCooling

Caching Fundamentals

This post introduces application-level caching in Laravel, demonstrating how to reduce database load and improve response times by storing frequently accessed data in application memory. It covers the use of Laravel's `Cache::remember()` method for retrieving and storing cached data, and highlights the significant performance gains achievable compared to direct database queries. The post also touches on different cache drivers (file, Redis, Memcached) and the importance of clearing the cache.

3 posts · 2022–2025

Timeline

20222026
Feature trailCooling

Vitess SQL Evaluation Engine

Vitess's SQL evaluation engine has evolved from an AST-based interpreter to a high-performance bytecode virtual machine. This transition, driven by the need for greater efficiency and maintainability in handling complex SQL expressions across sharded environments, involved static typing of SQL expressions at compile time and the implementation of a specialized VM. The new VM offers significant performance gains while remaining easier to maintain than the previous Go interpreter. This post details a specific optimization within the query planner to push aggregation down to MySQL, reducing data fetched by VTGate and preventing OOM errors. The solution involves delaying the 'ordering under aggregation' rewriter until the 'split aggregation' phase, allowing aggregation to be pushed down under the join.

8 posts · 2022–2025

Timeline

20222026
Feature trailCooling

EBS Failure Mitigation

PlanetScale details the high failure rate of Amazon EBS volumes, particularly their tendency to degrade in performance rather than fail completely. It highlights that these degradations, while often brief, can cause significant downtime for applications. The post quantifies the expected frequency of these failures and their compounding effect in distributed systems. It also introduces PlanetScale's mitigation strategies, including direct EBS monitoring and zero-downtime reparenting, and positions this as a key driver for PlanetScale Metal.

1 post · 2025

Timeline

20252026
Feature trailCooling

OSS to Private Fork Synchronization

PlanetScale has developed an automated system, the Vitess cherry-pick bot, to continuously synchronize changes from the open-source Vitess project into their private fork. This bot automates the cherry-picking of OSS commits into private branches and handles backporting to specific release branches. It uses GitHub Actions and a PlanetScale database to manage state and operations, including conflict detection and resolution. Weekly integrity checks ensure the synchronization process remains reliable.

1 post · 2025

Timeline

20252026
Feature trailCooling

Throttling and Rate Limiting

This post continues the series on throttlers, exploring the architectural trade-offs between singular and distributed deployments. It delves into the challenges of metrics access, high availability, and scaling for singular throttlers, introducing the concept of agents for metric collection. For distributed throttlers, it discusses various distribution strategies, including per-AZ deployments and functional partitioning. A case study on the Vitess tablet throttler highlights granular control and.

1 post · 2024

Timeline

20242026
Feature trailQuiet since 2024

Storage

PlanetScale's managed Postgres and MySQL services leverage B-trees and B+trees for efficient data indexing and storage. This post details the internal mechanics of these data structures, their application in database indexing, and the implications of primary key choices on performance. It covers how B+trees are used in InnoDB for storing table data and secondary indexes, and analyzes the performance trade-offs between sequential integer primary keys and random UUIDs, particularly in the context of insertions and data locality. The post also touches on the impact of node size on disk block efficiency and the benefits of shallower trees for faster lookups.

1 post · 2024

Timeline

20242026
Feature trailQuiet since 2024

Database Branching and Blue/Green Deployments

PlanetScale's branching technology provides a Git-like workflow for database schema changes, enabling safe, non-blocking, and rolling upgrades. This post introduces native MySQL `INPLACE` and `INSTANT` DDL, detailing their capabilities and limitations. `INPLACE` is found to be unsuitable for production due to replication lag and resource intensiveness. `INSTANT` DDL is ideal for metadata changes and simple column additions/drops but is limited in scope and lacks revertibility for destructive operations. For more complex changes, external tools like Vitess, gh-ost, and pt-online-schema-change are still the go-to solutions, offering similar design principles but operating differently and taking longer. The post emphasizes that while `INSTANT` DDL is preferred where supported, the majority of common schema changes still require these external tools, leading to a complexity of maintaining multiple techniques. Vitess and Spirit are highlighted for their ability to auto-detect when a migration can be fully handled by `INSTANT` DDL.

24 posts · 2021–2024

Timeline

20212026
Feature trailQuiet since 2024

Postgres to MySQL Migration

PlanetScale offers robust database migration solutions, including zero-downtime migrations for terabyte and petabyte scale datasets. This is achieved through a process involving consistent, non-locking snapshots, continuous replication of changes from the old to the new system, data verification using VDiff, and a transparent cutover mechanism that buffers incoming queries. The platform leverages Vitess's VReplication and `MoveTables` workflow for these operations, and can also facilitate sharding as part of the migration. The process supports bidirectional cutovers and rollback capabilities, ensuring data integrity and minimal disruption. This capability extends to migrating from PostgreSQL to MySQL and vice-versa, handling data type differences and other schema complexities.

1 post · 2023–2024

Timeline

20232026
Feature trailQuiet since 2024

MySQL Adaptive Hash Index

PlanetScale's managed MySQL offering now includes automatic optimization of B-tree index lookups through the Adaptive Hash Index (AHI). This feature dynamically builds in-memory hash indexes based on observed query patterns, accelerating frequently accessed data retrieval. The AHI operates on top of the InnoDB buffer pool, and its effectiveness is dependent on sufficient buffer pool size. Users can enable or disable this feature via the `innodb_adaptive_hash_index` configuration option.

1 post · 2024

Timeline

20242026
Feature trailQuiet since 2024

MySQL Memory Profiling

PlanetScale provides tools and techniques for profiling memory usage in MySQL queries. This includes leveraging the `performance_schema` to instrument various memory components and sampling memory usage at different granularities (global, by thread, by user, etc.). The post details how to identify memory-intensive operations like sorting and how to collect and visualize memory usage over time using custom scripts and libraries like Matplotlib. This capability helps users understand and optimize the memory footprint of their MySQL workloads.

1 post · 2024

Timeline

20242026
Feature trailQuiet since 2024

MySQL Integer Data Types

PlanetScale offers robust support for MySQL and MariaDB, including advanced features for handling JSON data types and optimizing the use of primary keys. This post details the JSON data type in MySQL, its benefits, caveats, and common operations. It explains when to use JSON, its storage footprint, performance implications, and provides examples of using JSON functions. Additionally, it addresses the performance implications of using UUIDs as primary keys in MySQL, recommending binary storage, and introduces generated hash columns for efficient indexing of large or composite values.

5 posts · 2022–2024

Timeline

20222026
Feature trailQuiet since 2024

MySQL Database Design Best Practices

PlanetScale offers robust support for MySQL and MariaDB, including advanced features for handling geospatial data and scaling options. This post details how to represent and query geographic features using MySQL's spatial data types and functions, enabling engineers to work with location-based information effectively within their databases. It covers data types like POINT, LINESTRING, and POLYGON, spatial formats (WKT, WKB), and common spatial functions for distance calculations, intersection ch. This post also details the process of upgrading from MySQL 5.7 to 8.0, covering character set changes, obsolete data types, authentication updates, new reserved words, SQL mode adjustments, C-style operator deprecation, server error code changes, and a zero-downtime upgrade path using PlanetScale's import tool. It highlights the benefits of upgrading to MySQL 8.0, including performance improvements and enhanced security features, and emphasizes the importance of performing this upgrade before the end-of-life for MySQL 5.7.

7 posts · 2023–2024

Timeline

20232026
Feature trailQuiet since 2023

Webhook Security

PlanetScale offers webhooks for event notifications, with security measures implemented to protect the webhook service from abuse, including Server-Side Request Forgery (SSRF) and Distributed Denial-of-Service (DDoS) attacks. Security measures include strict URL validation (HTTPS, blocking private IPs and own domains, DNS resolution), HTTP egress rules via Envoy Proxy, API-based rate limiting, webhook uniqueness checks with Sidekiq, isolated infrastructure for the webhook queue, and a beta progr

3 posts · 2023

Timeline

20232026
Feature trailQuiet since 2023

Developer Onboarding Personalization

PlanetScale has enhanced its developer onboarding experience by leveraging Markdoc, a Markdown-based syntax for creating custom documentation sites. This allows for more interactive and personalized content, enabling developers to quickly connect and query their PlanetScale databases. The system uses variables to inline user-specific credentials and extends code blocks with custom nodes to display filenames. Further customizations include dynamically swapping SSL certificates based on the user's operating system, providing a tailored and efficient onboarding path.

1 post · 2023

Timeline

20232026
Feature trailQuiet since 2023

Database Platform Comparison

PlanetScale offers enhanced database platform capabilities with the introduction of Scaler Pro, a new pricing and resource allocation model. This plan provides a combination of CPU, memory, and disk storage, offering more concrete metrics and control compared to traditional serverless models. Scaler Pro databases are configured with high availability features, including replication across three availability zones, semi-synchronous replication for data persistence, and continuous monitoring with automated failover. The pricing is competitive with established DBaaS solutions like Amazon RDS, offering comparable or superior availability and performance at a lower cost. The platform also integrates with tools like PlanetScale Insights and supports non-blocking schema changes.

2 posts · 2023

Timeline

20232026
Feature trailQuiet since 2023

Sharding And Partitioning

Sharding and partitioning are techniques for dividing and scaling large databases. Sharding distributes data across multiple servers, while partitioning splits tables within a single server. PlanetScale leverages Vitess for sharding, offering horizontal scaling and near-infinite scalability. Partitioning divides tables within an instance for performance and manageability. Both techniques aim to improve performance, manageability, and availability of large databases.

1 post · 2023

Timeline

20232026
Feature trailQuiet since 2023

MySQL Pagination

PlanetScale offers robust solutions for paginating results in MySQL and PostgreSQL. This includes detailed comparisons of offset/limit and cursor-based pagination, highlighting the performance drawbacks of offset/limit for deep pages. The introduction of the FastPage gem for Rails leverages the MySQL deferred join optimization to significantly improve the performance of offset/limit queries, especially for deeper pages. This gem makes it easy to apply this optimization to any ActiveRecord::Relation using offset/limit, offering a faster alternative for applications that rely on this pagination strategy.

2 posts · 2022–2023

Timeline

20222026
Feature trailQuiet since 2023

SQLAlchemy Integration

PlanetScale provides documentation and examples for integrating with popular Python libraries like SQLAlchemy, enabling developers to interact with MySQL-compatible databases using both raw SQL and ORM approaches. This includes setting up database engines, executing queries, and defining data models.

1 post · 2023

Timeline

20232026
Feature trailQuiet since 2023

PlanetScale API and OAuth Applications

PlanetScale introduces a new API and OAuth applications, enabling programmatic management of databases, branches, deploy requests, and connection strings. This allows for automation through CI/CD, infrastructure as code, and integration with other developer tools. OAuth applications further enable users to grant granular access to their PlanetScale accounts from third-party applications. Integrations with Netlify and Resmo demonstrate early use cases for enhanced developer workflows and asset visibility.

1 post · 2023

Timeline

20232026
Feature trailQuiet since 2023

N+1 Query Detection and Resolution

PlanetScale offers robust solutions for detecting and mitigating N+1 queries in Rails applications. This includes leveraging gems like Bullet for proactive discovery and utilizing Rails 6.1+'s `strict_loading` feature, which can be applied globally or selectively in development environments to raise errors on lazy loading. Additionally, the platform supports asynchronous association destruction (`dependent: :destroy_async`) to handle callbacks for dependent records without blocking the main thre

5 posts · 2022–2023

Timeline

20222026
Feature trailQuiet since 2023

SSL/TLS Certificate Management

PlanetScale provides managed database services that require secure connections via SSL/TLS. This capability covers the management, troubleshooting, and integration of SSL/TLS certificates for secure database access, including understanding certificate authorities, common error scenarios, and workarounds for third-party platform integrations.

1 post · 2023

Timeline

20232026
Feature trailQuiet since 2022

Secure Credential Management with AWS KMS

This post introduces a method for securely managing sensitive database credentials, such as PlanetScale connection strings, by leveraging AWS Key Management Service (KMS) to encrypt environment variables used within AWS Lambda functions. This enhances security by preventing direct exposure of credentials in code or standard environment variables.

1 post · 2022

Timeline

20222026
Feature trailQuiet since 2022

Serverless Driver for JavaScript

PlanetScale offers a serverless driver for JavaScript, enabling direct HTTP connections to databases from environments like Cloudflare Workers, Vercel Edge Functions, and Netlify Edge Functions. This integration leverages a new HTTP API and global routing infrastructure, similar to a CDN, to reduce latency and improve connection reliability and performance. It supports standard SQL operations and helps prevent SQL injection. The driver works in any environment supporting the Fetch API.

3 posts · 2021–2022

Timeline

20212026
Feature trailQuiet since 2022

TAOBench Workload Benchmarking

PlanetScale has integrated TAOBench, a synthetic benchmark for social media workloads, into its benchmarking arsenal. This allows for the evaluation of database performance under realistic, high-concurrency scenarios, focusing on transactional and overall workload compositions. The benchmark simulates 'hot row' scenarios and includes load, bulk reads, and experiments phases to test system stability and scalability under extreme resource pressure. PlanetScale's results demonstrate sustained stability even when resource-constrained.

1 post · 2022

Timeline

20222026
Feature trailQuiet since 2022

Sidekiq Job Control

PlanetScale has introduced a mechanism to control Sidekiq jobs in production without requiring code deploys. This is achieved by integrating Sidekiq client middleware with a feature flagging system (Flipper). This allows for immediate disabling of specific job classes by enabling a corresponding feature flag. This capability enhances operational flexibility and reduces the risk associated with urgent hotfixes. The system also incorporates strategies for self-healing background jobs by storing state in the database, using scheduler jobs to re-queue missed tasks, implementing bulk scheduling for efficiency, adding jitter to spread out job execution, and handling job uniqueness through database locks and Sidekiq's unique jobs feature.

2 posts · 2022

Timeline

20222026
Feature trailQuiet since 2022

Consensus Algorithms

This series explores consensus algorithms, focusing on durability at scale. Part 1 introduces the core problems consensus algorithms solve: distributed durability, availability, and automation. It emphasizes the need for flexible algorithms that can adapt to complex cloud provider topologies and pricing structures, contrasting this with rigid traditional algorithms like Paxos and Raft. The approach taken is engineering-focused, using terminology and an objective-based, top-down methodology to identify and separate concerns, enabling better trade-offs and more flexible implementations. The series aims to demonstrate how these objectives can be achieved, with a specific focus on Vitess and vanilla MySQL.

8 posts · 2020–2022

Timeline

20202026
Feature trailQuiet since 2022

API Identifier Strategy

PlanetScale's API identifier strategy has evolved to use NanoIDs for public-facing identifiers. This decision was driven by the need for shorter, more user-friendly IDs compared to UUIDs, while maintaining a low probability of collisions and ease of generation across multiple programming languages. The implementation involves adding a `public_id` column to database schemas and using concerns in Rails and dedicated packages in Go to auto-generate these IDs. This approach enhances developer experience by making IDs easier to select and use in URLs.

1 post · 2022

Timeline

20222026
Feature trailQuiet since 2022

Relational Database Schema Design

PlanetScale offers a Git-like workflow for database schema changes, enabling safe, non-blocking, and rolling upgrades. This approach aims to reduce the operational friction associated with traditional RDBMS schema management, giving developers ownership and velocity. The system provides mechanisms for managing metadata changes, handling potential production risks, and facilitating developer-friendly schema evolution.

2 posts · 2021–2022

Timeline

20212026
Feature trailQuiet since 2022

Password Strength Meter

PlanetScale implements an entropy-based password strength meter for its signup forms, moving away from rigid password rules to improve user experience and security. This system provides real-time feedback to users as they type, working well with password managers and offering a more user-friendly approach to strong password enforcement.

1 post · 2022

Timeline

20222026
Feature trailQuiet since 2022

Test Suite Performance Optimization

This post details how PlanetScale achieved a 1-minute test suite runtime for their Rails application by optimizing test execution on Buildkite. Key strategies included leveraging parallel testing on CI with 64 workers and auditing FactoryBot usage to reduce the creation of unnecessary associated objects. The team implemented specific tests to guard against regressions in factory behavior. This capability focuses on improving developer productivity through faster feedback cycles in the CI/CD pipeline.

1 post · 2022

Timeline

20222026
Feature trailQuiet since 2021

PlanetScale Managed Deployment Options

PlanetScale offers multiple deployment options for its managed database service, catering to different customer needs regarding tenancy, compliance, and network integration. Initially launched with a shared tenancy model, PlanetScale now offers a single-tenancy 'PlanetScale Managed' option for organizations with strict regulatory and compliance requirements. This managed service can be deployed within the customer's own AWS or GCP accounts, providing enhanced isolation and control. It leverages private connectivity solutions like AWS PrivateLink and GCP Private Service Connect. Benefits include a fully managed experience, expert assistance, compliance certifications (HIPAA, PCI), and deployment in additional regions. The service is accessible via the standard PlanetScale API, CLI, and web interface, ensuring a consistent user experience regardless of the deployment model.

1 post · 2021

Timeline

20212026
Feature trailQuiet since 2021

Database Web Console

PlanetScale introduces a web-based SQL console accessible directly from database branch pages. This console provides a user-friendly interface for running SQL commands, inserting tables, and managing database branches without requiring command-line expertise. It includes friendly error messages for common operations like altering production databases. The console streamlines the database branch lifecycle, from creation to deployment, and integrates with tools like Vercel for application deployment workflows.

1 post · 2021

Timeline

20212026