Skip to content
Blogs
PlanetScale logo

PlanetScale

Engineering blog · planetscale.com/blog

154posts0this week0watchers

Feature trails

45
Feature trailActive

Database Traffic Control

PlanetScale offers enhanced database traffic control, including 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 routing them to the appropriate database instance. This feature aims to optimize database egress and improve connection management for distributed applications.

8 posts · 2022–2026

Timeline

20222026
Feature trailActive

Incident Response and Resilience

PlanetScale's Neki system enhances database resilience by implementing sophisticated unplanned failover mechanisms. This involves a multi-stage detection process that relies on replica views to confirm primary unavailability, preventing split-brain scenarios. Upon confirmation, replicas are disconnected from the old primary to freeze their WAL positions. A new primary is then selected based on the highest replayed WAL position, ensuring data consistency. This system handles various failure modes, including process crashes, network partitions, and frozen processes, by tuning PostgreSQL replication settings to consistently report broken replication when issues arise.

5 posts · 2020–2026

Timeline

20202026
Feature trailActive

EBS Failure Mitigation

PlanetScale offers both network-attached (EBS-backed) and locally-attached (Metal) storage options for its managed databases. Metal leverages local NVMe drives for reduced latency and higher IOPS, while maintaining durability through a primary/replica architecture across distinct availability zones with semi-synchronous replication. This provides a performance and cost advantage for high-I/O workloads where data doesn't fit entirely in RAM. The platform also offers granular control over storage and compute sizing, including smaller configurations.

2 posts · 2025–2026

Timeline

20252026
Feature trailActive

Sharding And Partitioning

PlanetScale's Neki sharded Postgres solution evolves its shard design capabilities. This post introduces 'shard groups' as the unit of co-location, allowing related tables to reside on the same shard for improved query performance and transactional integrity. It details how to configure shard groups using `xxhash` for uniform distribution, `range` for specific key allocations, and `modulo` for predictable but less flexible distribution. Reference tables are supported for global data. Global seco

2 posts · 2023–2026

Timeline

20232026
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 Postgres engine, with this post highlighting the dangers of `ON DELETE CASCADE` and recommending soft deletes and bounded transactions for large-scale data deletion.

7 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 avoided. New features include read-only replicas for shards, smaller Metal instances, and enhanced Terraform/CLI management for Neki extensions and router parameters. Support for Azure regions has also been added. Under the hood, significant engineering effort has focused on the query layer, expanding SQL compatibility to include features like INSERT ... SELECT ... ON CONFLICT, cross-shard UPDATE ... FROM, DELETE ... USING, MERGE, correlated EXISTS, ARRAY(SELECT ...), SQL cursors, LISTEN/NOTIFY, materialized views, and PL/pgSQL exception handlers. Exporting data with standard tools like pg_dump is now supported via `COPY ... TO STDOUT` on sharded tables. Bulk write performance has seen substantial improvements, with distributed INSERT ... SELECT being ~76x faster and COPY ingest ~5x faster. A new `EXPLAIN (NEKI_PG_PLAN)` command provides visibility into Neki's distributed plan alongside individual shard plans.

26 posts · 2022–2026

Timeline

20222026
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 integration of PlanetScale with Azure, specifically addressing Kubernetes pod networking challenges by implementing IP address allocation in blocks to overcome Azure's network caps and improve performance.

5 posts · 2022–2026

Timeline

20222026
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, lo

7 posts · 2026

Timeline

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.

4 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`.

4 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`.

7 posts · 2022–2026

Timeline

20222026
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

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.

9 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.

2 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 trailCooling

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.

3 posts · 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.

2 posts · 2023–2025

Timeline

20232026
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.

4 posts · 2022–2025

Timeline

20222026
Feature trailCooling

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.

3 posts · 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

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.

9 posts · 2020–2025

Timeline

20202026
Feature trailQuiet since 2024

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

Postgres's journey to becoming the default database choice is analyzed through key historical moments, including its JSONB support in 2014 to compete with document databases, Heroku's pivotal role in making it accessible in 2011, and the fragmentation of MySQL's community after Oracle's acquisition in 2010. The post highlights how these events, combined with Postgres's inherent strengths and community contributions, solidified its position as a leading database technology, further amplified by its adoption in the agentic era and the integration of features like pgvector.

1 post · 2024

Timeline

20242026
Feature trailQuiet since 2024

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.

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.

5 posts · 2022–2024

Timeline

20222026
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 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.

3 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.

5 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

1 post · 2023

Timeline

20232026
Feature trailQuiet since 2023

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.

4 posts · 2020–2023

Timeline

20202026
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.

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

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

3 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

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.

7 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.

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.

1 post · 2022

Timeline

20222026
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