Home / Companies / PlanetScale / Blog / August 2023

August 2023 Summaries

9 posts from PlanetScale

Filter
Month: Year:
Post Summaries Back to Blog
Horizontal sharding for MySQL made easy allows developers to scale their databases linearly by partitioning data across multiple servers, each with an identical schema, reducing the workload and making it possible to keep data on a single server at an optimal size. This approach contrasts with vertical scaling, which involves increasing hardware resources to improve speed and capacity, but can lead to overprovisioning and inefficiencies. Horizontal sharding offers several benefits, including improved performance, cost savings, and reduced operational complexity. Companies like YouTube, Slack, JD.com, and Hubspot have successfully implemented horizontal sharding using tools like Vitess and PlanetScale, which provide a managed database platform for accessing the power of Vitess without requiring extensive expertise or risk.
Aug 31, 2023 1,352 words in the original blog post.
PlanetScale deploys multiple schema changes near-atomically by treating all changes in a branch as a single deployment, ensuring that production database schema remains stable throughout the process and changes are applied almost simultaneously when all changes are ready. This approach allows for cancellable deployments with minimal impact on production, making it easier to manage complex schema changes without disrupting the system. The use of concurrency and dependency resolution techniques, such as schemadiff and Vitess, enables PlanetScale to deploy multiple changes concurrently while maintaining a valid ordering of changes. However, there are limitations to this approach, including resource constraints and potential complexity in deploying large numbers of changes simultaneously. By treating schema changes as deployments and using advanced validation and execution mechanisms, PlanetScale provides a way to manage complex schema changes with greater control and predictability.
Aug 29, 2023 2,163 words in the original blog post.
A PlanetScale database is built using Vitess, a horizontally-scaling MySQL-compatible database platform, and Kubernetes, an orchestration tool that provides resilient infrastructure. Every database in PlanetScale has its own dedicated Vitess cluster, which includes multiple components such as tablets, vtgate instances, and vtctld instances. This allows for scalability, reliability, and high availability. Additionally, PlanetScale provides features such as edge routing, online schema changes, automated backups, primary and replicas, availability zones, and built-in monitoring with Insights to ensure optimal performance and security. The platform also offers a simple interface for creating databases, managing users and permissions, and automating administrative tasks using service tokens and the pscale CLI. Overall, PlanetScale aims to provide a straightforward and easy-to-use interface while leveraging complex technology to create a powerful and reliable database solution.
Aug 23, 2023 2,425 words in the original blog post.
The text discusses the use of middleware technology in scaling applications horizontally using Vitess to enable near-infinite sharding of MySQL databases. It highlights the challenges associated with application-level sharding and how Vitess overcomes these issues, allowing for seamless horizontal scaling.
Aug 22, 2023 48 words in the original blog post.
Introducing IP restrictions on database passwords as an additional security measure to operate databases securely, PlanetScale now supports IP restrictions in beta, allowing admins to specify ranges of IP addresses allowed to connect for a given password, to segment access and meet compliance requirements, this feature is designed to provide an extra layer of security for organizations.
Aug 15, 2023 265 words in the original blog post.
We built a scalable telemetry pipeline using Apache Kafka and a sharded PlanetScale database, which stores time series data for our built-in query performance tool Insights. To address the challenges of storing query pattern-level statistics and individual slow query events, we used Prometheus for database-level aggregations and MySQL for storing query-pattern level statistics and slow query events, leveraging Vitess to proxy query traffic and instrument our internal build. The pipeline uses Kafka Consumers to read data from Kafka topics, which are then written to MySQL, where they are stored in sharded tables with a database ID as the shard key. To efficiently collect and store percentile data, we used DDSketches, a probabilistic data structure that allows for fast and accurate quantile estimates. We also chose MySQL due to its high cardinality of our primary dimension, well-known set of dimensions, ability to filter datasets, and natural shard key, avoiding the need for an additional storage system. The pipeline has scaled linearly with the number of shards, and we've successfully run it on fairly small machines, allowing us to scale up as needed.
Aug 10, 2023 2,012 words in the original blog post.
Databases can be a significant financial burden for companies if they don't function as expected, causing downtime, inefficient management, and costly database DevOps challenges. Downtime can result in lost revenue, contracts, and user trust, with even short periods of unavailability costing millions of dollars. Poor database management, often due to lack of dedicated administrators or engineers, can lead to decreased productivity and increased costs. Furthermore, manual database schema changes can be prone to errors and downtime, creating a bottleneck for the application release process. However, with the right tools and solutions, such as PlanetScale's automated no-downtime version updates, automatic backups, and built-in query monitoring, companies can minimize these risks and optimize their database performance. By adopting best practices and leveraging technology, databases can work in favor of businesses, not against them.
Aug 08, 2023 1,634 words in the original blog post.
The Brand team at PlanetScale designs and builds marketing experiences for the company's touchpoints, including the website, swag, and sales collateral. The team is responsible for creating a consistent look and feel across all marketing materials. They use a combination of illustration, design engineering, and Next.js to create engaging web pages that balance aesthetics with functionality. The Brand team follows principles outlined by Jason, emphasizing trust, autonomy, and collaboration among employees. They aim to create marketing touchpoints that are performant, accessible, beautiful, and informative, while accurately representing the care within PlanetScale's database platform.
Aug 04, 2023 515 words in the original blog post.
A Node.js application with Express, Pug, and MySQL was built to create a contacts web app that utilizes Server Side Rendering (SSR) for faster load times. PlanetScale provides the database service, allowing users to enjoy all its benefits via a highly scalable and reliable service provider. Prisma is used as an Object Relational Mapping (ORM) tool to handle interactions with the PlanetScale database. The application features validation using express-validator, which ensures that user input is not incorrect or dangerous. Four functions were implemented: index, create, store, and destroy, which render client-related pages such as the list of all clients, the form for adding a new client, the submitted form to be validated, and the deletion of a client from the database, respectively. The application was updated with routes for these controller functions and middleware to parse the body of the request.
Aug 02, 2023 2,681 words in the original blog post.