Distribute Amazon RDS traffic between read replicas using Network Load Balancer

https://d2908q01vomqb2.cloudfront.net/887309d048beef83ad3eabf2a79a64a389ab1c9f/2026/11/10/DBBLOG-5447-featured-image.png

In this post, you will learn how to use a Network Load Balancer (NLB) to distribute traffic across Amazon Relational Database Service (Amazon RDS) read replicas with health-aware, AZ-affinity routing. You will also learn how this architecture simplifies hybrid connectivity over AWS Direct Connect or AWS Site-to-Site VPN to your RDS read replicas. The load balancer acts as the stable entry point for read replica traffic, without AWS PrivateLink overhead. For PrivateLink-based alternatives, see Accessing Amazon RDS across VPCs and Accessing Amazon RDS across accounts.

There are several approaches to balance traffic across read replicas, including Amazon Aurora (Aurora) built-in reader endpoints, Amazon Route 53 weighted routing, and open source proxies such as ProxySQL and PgBouncer. Each comes with benefits and trade-offs, which the following section discusses.

Existing approaches for read replica load balancing

Several approaches exist today for distributing read traffic across replicas, each with its own strengths. This post presents an architecture based on Network Load Balancer as an additional option to consider alongside them.

Aurora reader endpoint

If you run Aurora, you can use its built-in reader endpoints. The Aurora reader endpoint automatically load balances read traffic across available read replicas, distributing connections without requiring client-side logic, a proxy, or a load balancer. This simplifies your architecture and improves read scalability. You can learn more about the Aurora reader endpoint distribution logic in How does Aurora MySQL or PostgreSQL distribute workload between reader nodes.

Route 53 weighted routing

Route 53 weighted routing can distribute traffic across read replicas, as described in Load balancing strategies for RDS read replicas and this AWS re:Post article. This is straightforward to set up and works across all engines supported on Amazon RDS. This approach requires a Route 53 hosted zone. It is prone to client-side DNS caching that causes uneven traffic distribution. Setting a low time to live (TTL) value helps reduce the effect. It has no awareness of the caller’s Availability Zone. For on-premises clients over Direct Connect or Site-to-Site VPN, consuming Route 53 private hosted zones adds cost and complexity with Amazon Route 53 Resolver Inbound Endpoint.

Connection pooling with ProxySQL and PgBouncer

For connection pooling and database-aware routing, open source proxies such as ProxySQL and PgBouncer are well-established solutions that support read/write splitting and can distribute connections across read replicas. For a detailed comparison of PgBouncer and Amazon RDS Proxy for PostgreSQL workload, see understanding the difference between PgBouncer and Amazon RDS Proxy for PostgreSQL connection pooling. They also support highly available configurations with HAProxy and near zero-downtime upgrades. These tools introduce operational overhead because you must deploy, patch, and scale the proxy tier yourself. A single proxy instance is pinned to one Availability Zone, so database traffic routes through that AZ regardless of where the client and RDS instance reside. This prevents AZ-affinity traffic flow. Achieving high availability requires additional components or multiple proxy instances, adding further complexity.

The Network Load Balancer architecture described in this blog post addresses health-aware routing, AZ affinity, and hybrid connectivity in a single solution. This architecture works with any Amazon RDS engine that supports read replicas. Configure the target group port to match your engine (for example, 3306 for MySQL, 5432 for PostgreSQL).

Solution overview

To distribute read traffic across replicas with health awareness and AZ affinity, this solution uses a Network Load Balancer as the stable entry point. An AWS Lambda function keeps the Network Load Balancer target group synchronized with the current IP addresses of your RDS read replicas.

Architecture overview showing an AWS Lambda function that updates a Network Load Balancer target group with the current IP addresses of Amazon RDS read replicas

Figure 1: Architecture overview

How it works

The Lambda function, triggered by Amazon EventBridge, continuously synchronizes your RDS read replica IP addresses with a Network Load Balancer target group. It monitors DNS changes, registers new replicas, and cautiously deregisters stale ones, so your application traffic always flows to healthy, available database endpoints.

Trigger mechanism

Amazon EventBridge rule triggers the Lambda function every minute (configurable to a shorter interval). This frequent polling means that changes to your read replica fleet, whether from scaling events, failovers, or maintenance, are reflected in the Network Load Balancer target group within 60 seconds.

DNS resolution process

When invoked, the Lambda function reads environment variables containing the DNS names of your RDS read replicas and the Amazon Resource Name (ARN) of the Network Load Balancer target group to manage.

The function then resolves each replica DNS name to its current IP addresses. To handle transient DNS fluctuations (temporary resolution failures or network interruptions), the code includes retry logic that prevents false positives from triggering unnecessary deregistration.

State management

Because Lambda functions are stateless, the solution persists state across invocations using two JSON files stored in Amazon Simple Storage Service (Amazon S3).

  • active_ip.json contains the IP addresses that were successfully resolved from DNS during the last invocation. This represents the known-good state of your replica fleet.
  • pending_ip.json tracks IP addresses that are candidates for deregistration, along with a counter indicating how many consecutive invocations each IP has been flagged for removal.

On the first invocation, if these files do not exist in S3, the Lambda function creates them automatically based on the current DNS resolution results and Network Load Balancer target group state.

Registration is immediate, while deregistration follows a cautious approach. Registering an IP that shouldn’t be registered carries low risk because the Network Load Balancer performs health checks on targets. If an IP is invalid or unreachable, the health check marks it as unhealthy and the Network Load Balancer won’t route traffic to it. Subsequent invocations clean up the IP when it stops appearing in DNS.

Key design decisions

AZ affinity and cross-AZ data transfer costs

Network Load Balancer supports Availability Zone DNS affinity. When you turn on this feature, clients that resolve the Network Load Balancer DNS name using Route 53 Resolver receive load balancer IP addresses within their own Availability Zone. If no healthy Network Load Balancer IP addresses exist in the client’s own Availability Zone, DNS might fall back to an IP address in another Availability Zone. For applications running on Amazon Elastic Compute Cloud (Amazon EC2), Amazon Elastic Container Service (Amazon ECS), or Amazon Elastic Kubernetes Service (Amazon EKS) within the same Amazon Virtual Private Cloud (Amazon VPC), this topology-aware routing helps reduce inter-AZ data transfer costs, lower latency, and build zonally independent application architectures.

To fully benefit from zonal affinity, keep cross-zone load balancing disabled so that traffic stays within a single Availability Zone end to end, minimizing both cost and latency.

Network Load Balancer Availability Zone DNS affinity keeping client connections within the same Availability Zone

Figure 2: NLB AZ affinity

Eliminating PrivateLink overhead

This architecture connects clients directly through the Network Load Balancer, without requiring PrivateLink. This removes the hourly endpoint charges and data processing fees associated with PrivateLink, reducing overall cost.

A Network Load Balancer provides one static IP address per enabled Availability Zone. Applications in the same or a different VPC or AWS account can reach these IP addresses directly through AWS Transit Gateway or VPC peering. On-premises clients can also connect to these IP addresses directly, without a DNS dependency.

Health detection

You can configure health checks as frequently as every 5 seconds (the shortest interval Network Load Balancer supports, with a default of 30 seconds). When a replica fails its health check, the Network Load Balancer stops sending traffic to it, keeping requests flowing only to healthy targets.

Hybrid and on-premises connectivity

If you connect from on-premises over Direct Connect or Site-to-Site VPN, the Network Load Balancer approach reduces the setup needed for database connectivity.

If you want a custom domain name pointing to your private RDS endpoints, consider how on-premises clients resolve DNS. On-premises clients don’t natively resolve a Route 53 private hosted zone for the weighted records. You have several options.

  • Maintain a public domain name mapped to private infrastructure IP address, effectively revealing your internal topology through public DNS.
  • Find a DNS configuration that supports multiple CNAME chaining for the same domain.
  • Deploy Route 53 Resolver inbound endpoints paired with on-premises DNS forwarders and Route 53 private hosted zones, which adds significant operational overhead.

A private Network Load Balancer receives a publicly DNS-resolvable host name. Although the Network Load Balancer DNS name resolves through public DNS, it returns private IP addresses. These are reachable from within the VPC (and VPC peering or Transit Gateway). For on-premises clients, reachability requires Direct Connect or a Site-to-Site VPN. The Network Load Balancer provides a single host name across all enabled Availability Zones, compared to individual read replicas that each have their own endpoint host name. On-premises clients resolve this host name through standard DNS, and traffic flows over your existing Direct Connect or Site-to-Site VPN connection to the static IP addresses of Network Load Balancer.

If mapping a custom domain to your existing infrastructure isn’t a requirement, then no additional DNS infrastructure, no Resolver endpoints, and no private hosted zone configuration are needed.

Since Network Load Balancer IP addresses are static, on-premises clients can also connect directly by IP address.

On-premises clients connecting to Network Load Balancer static IP addresses over AWS Direct Connect or AWS Site-to-Site VPN

Figure 3: On-premises connectivity

Implementation

Prerequisites

  • An AWS account with permissions to create Network Load Balancer, Lambda, Amazon S3, and Amazon EventBridge resources.
  • An Amazon RDS instance with one or more read replicas across multiple Availability Zones.
  • A VPC with subnets in at least two Availability Zones.
  • Familiarity with AWS CloudFormation.
  • AWS Command Line Interface (AWS CLI) installed and configured.

Deployment

The solution is available in the RDS read replica NLB registration GitHub repository. The repository contains the Lambda function (populate_NLB_TG_with_RDS_RR.py), a CloudFormation template, and a detailed Deployment Guide.

Quick start:

  1. Clone the repository and run the included deploy.sh script, which packages the Lambda code and uploads it to Amazon S3:
  2. Deploy the CloudFormation stack using the template URL printed by the script. Key parameters include:
  • RDSReplicaDNSNames – Comma-separated DNS endpoints of your read replicas.
  • NLBTargetGroupARN – ARN of your existing Network Load Balancer target group (or set CreateTargetGroup=true to create one).
  • S3BucketName – Bucket for Lambda state persistence (or set CreateS3Bucket=true).
  1. Verify that targets are registered and healthy:

You should see each replica IP listed with "State": "healthy".

For the full parameter reference, optional resource creation flags, CLI deployment, troubleshooting, and cleanup, see the Deployment Guide.

The following screenshot shows an example Amazon CloudWatch log entry when the Lambda function runs successfully.

Amazon CloudWatch log entry showing a successful Lambda function run that synchronized the target group

Figure 4: Amazon CloudWatch log for a successful Lambda run

The following screenshot shows the registered targets in the Network Load Balancer target group.

Network Load Balancer target group showing registered read replica IP targets in a healthy state

Figure 5: Registered targets in the Network Load Balancer target group

Note: Make sure the RDS security group allows inbound TCP traffic on your database port from the Network Load Balancer subnets. For the AWS Identity and Access Management (IAM) policy for the Lambda function and S3 bucket security configuration, see the Deployment Guide.

Cost estimate

This cost estimate covers the resources used with Network Load Balancer handling TCP traffic across three AZs, a Lambda function running every minute to resolve RDS endpoint IPs and update Network Load Balancer target groups, an S3 bucket to store DNS resolution results between invocations, and three RDS read replicas (db.r6g.large with 100 GB gp3 storage each).

The following is an estimated total cost of ownership for this architecture in a deployment (three AZs, three read replicas, moderate traffic) where application server traffic to read replicas is distributed evenly across AZs. This considers only the additional overhead cost without the RDS cost, at the time of writing (subject to change).

NLB and Lambda IP sync cost

Service Configuration
Network Load Balancer 1 NLB, 3 AZs, ~10 GB/hr TCP throughput, ~500 new connections/sec, ~120 s avg connection duration
AWS Lambda 1 invocation/min (IP sync function), x86, 512 MB memory
Amazon S3 ~0.5 GB storage, ~43,200 PUT/GET requests/month
Data Transfer (Lambda) Minimal outbound (DNS resolution + S3 API calls)

Note: Use the AWS Pricing Calculator with the preceding configuration to estimate the monthly cost for your Region and traffic pattern.

When connections use round-robin or uniform load balancing without AZ awareness, each application server has an equal probability of connecting to any of the three read replicas. Only one out of three connections lands in the same AZ as the caller. The remaining two-thirds (66.7 percent) of connections cross AZ boundaries.

For example, at 10 GB/hour (about 7 TB/month) through the Network Load Balancer: 7 TB × 0.667 ≈ 4.7 TB of inter-AZ traffic per month. For current inter-AZ data transfer rates, see EC2 data transfer pricing.

With AZ DNS affinity enabled and cross-zone load balancing disabled, traffic stays within the same AZ end to end in the steady state, reducing inter-AZ data transfer.

Note: To estimate the impact for your workload, review your current inter-AZ data transfer costs to RDS and compare them against the Network Load Balancer architecture overhead. This helps you determine whether the architecture results in net savings or additional overhead for your specific traffic patterns.

Clean up

To avoid ongoing charges, remove the resources created for this solution.

  • Delete the CloudFormation stack. This removes the Network Load Balancer, Lambda function, Amazon EventBridge rule, and IAM roles.
  • Verify that the Network Load Balancer and target groups are deleted. You can use the AWS CLI command aws elbv2 describe-load-balancers to confirm.
  • Delete the S3 bucket or state files that the Lambda function used for DNS resolution results.
  • If you created read replicas for testing, delete them using the AWS CLI or CloudFormation.

Considerations and limitations

  • Note that the Network Load Balancer balances connections, not queries. Open or recycle connections periodically for query redistribution logic.
  • In Amazon EKS environments, pod DNS queries handled by CoreDNS can break the Network Load Balancer zonal DNS affinity. When a pod and its CoreDNS node are in different AZs, the DNS response returns the Network Load Balancer IP for the CoreDNS node’s AZ rather than the application node’s AZ. To preserve AZ-local routing, deploy NodeLocal DNSCache so each pod resolves DNS through a cache daemon running on its own node. For setup steps, see Install NodeLocal DNSCache in Amazon EKS.
  • When a replica IP is deregistered, the Network Load Balancer applies the target group’s deregistration delay (default 300 seconds, configurable). This gives existing connections time to complete gracefully before the target is removed from the load balancer.

Conclusion

In this post, you learned how to use a Network Load Balancer and a Lambda function to spread read traffic across Amazon RDS read replicas. The Lambda function keeps the target group in sync with your replica IP addresses. Network Load Balancer health checks send traffic only to replicas that pass their checks. Availability Zone DNS affinity, with cross-zone load balancing turned off, keeps traffic within the client’s Availability Zone. This architecture also gives on-premises clients a single stable host name and static IP addresses over Direct Connect or Site-to-Site VPN, without PrivateLink or Route 53 Resolver endpoints.

To get started, deploy the CloudFormation template from the GitHub repository. Then check that the target group lists your read replicas. After deployment, watch Amazon CloudWatch metrics for Lambda errors and unhealthy target counts to confirm the synchronization works.

 


About the authors

Vijay Chakraborty

Vijay is a Technical Account Manager at AWS, based in India. He helps customers design, develop, and operate secure, scalable, and innovative solutions using the breadth and depth of AWS capabilities to deliver measurable business outcomes. He provides strategic technical guidance across the cloud journey from architecture reviews and migration planning to cost optimization and operational excellence.

Debapriyo Jogi

Debapriyo, an AWS Technical Account Manager specializing in cloud networking, adeptly fosters strong customer relationships while offering expert technical guidance. He assists organizations in designing resilient, efficient, and adaptable cloud and network architectures. He provides strategic insights and tailored recommendations to optimize AWS usage, enhance network performance, and facilitate seamless cloud adoption.

Arun Kumar N C

Arun, an AWS Technical Account Manager specializing in cloud networking, excels at building strategic customer relationships and providing expert guidance. He helps customers develop scalable, secure, and cost-effective cloud solutions, offering proactive support and tailored advice to optimize AWS environments and drive successful cloud adoption.

Planet for the MySQL Community

Before You Write Your Next Laravel Migration, Design Your Database

https://media2.dev.to/dynamic/image/width=1200,height=627,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fschemasketch.dev%2Fog-image.png

We’ve all done it.

You start a new Laravel project, create your first migration, add a few relationships, and move on to building features.

A few weeks later, the database starts getting complicated.

You discover relationships you didn’t consider, tables that need restructuring, missing indexes, and migrations that are becoming increasingly difficult to maintain.

Suddenly, changing the database becomes much harder than it should be.

What if we spent a little more time understanding the database before writing the code?



Database design shouldn’t be an afterthought

A database schema is one of the most important parts of an application.

It defines how your data is structured, how different entities relate to each other, and how your application will evolve.

Yet many developers approach database design incrementally, figuring things out as they implement features.

There is nothing inherently wrong with that approach. But having a visual representation of your database can make a significant difference.

Before implementing a new system, consider:

  • What are the main entities?
  • How are they related?
  • Are the relationships correct?
  • Are there unnecessary or duplicated fields?
  • Will the structure support future requirements?
  • Can another developer understand the database without digging through dozens of migrations?

A database diagram helps answer these questions before they become development problems.



From database structure to visual diagrams

This is one of the reasons I started building SchemaSketch.

SchemaSketch is a database diagramming platform designed to help developers understand, visualize, and work with database structures.

You can:

  • Generate database diagrams from SQL.
  • Visualize tables, columns, and relationships.
  • Work with DBML.
  • Convert SQL into DBML using free online tools.
  • Integrate database workflows into your development process.

The goal is simple: make database structure easier to understand and maintain.

Explore: https://schemasketch.dev



Working with Laravel?

If you’re a Laravel developer, there’s also a dedicated SchemaSketch Laravel package.

It provides an Artisan command:

php artisan schemasketch:export

This brings SchemaSketch into your Laravel development workflow and makes it easier to work with your application’s database structure.

You can find the package and installation instructions here:

SchemaSketch Laravel Package



Think beyond individual migrations

One thing I’ve learned from working on larger applications is that understanding the overall database structure is just as important as understanding individual tables.

As applications grow, database knowledge can become scattered across migrations, models, documentation, and developers’ heads.

Having a visual representation helps create a shared understanding of the system.

It is useful during:

  • New feature planning.
  • Code reviews.
  • Database refactoring.
  • Onboarding new developers.
  • Architecture discussions.
  • Long-term maintenance.



A small change in workflow can make a big difference

You don’t necessarily need to change how you build Laravel applications.

You can simply introduce one additional step:

Understand the database structure before implementing the feature.

Draw it. Review it. Discuss it. Then start coding.

If you’re working with databases and want to give this approach a try, check out SchemaSketch.

I’d also love to hear how other Laravel developers approach database design.

Do you design your database before writing migrations, or do you prefer to figure it out as the application evolves?

Laravel News Links

Open-Source ESP32 remote controls thousands of devices

https://cdn-blog.adafruit.com/uploads/2026/11/open-source-esp32-remote-controls-thousands-of-devices.jpg

Open-Source ESP32 remote controls thousands of devices

Ananthu Ashok, writing for Open Source For You, covers IRis, an open-source universal infrared remote built around an ESP32 by Nicolas Ruiz Neiman. It learns commands from existing remotes, stores them and replays them to control other devices.

The build uses an ESP32-WROOM-32 module, a 1.3 inch OLED screen and five push buttons for the menu. A TSOP38238 receiver picks up the incoming signals, and two infrared LEDs driven by a 2N2222 transistor send them back out. The parts are in a 3D-printed case powered by an 18650 lithium-ion cell.

IRis decodes NEC, Samsung, Sony SIRC, RC5 and JVC, saving the protocol, address and command. Signals it can’t identify are recorded raw. Captured commands can be grouped into virtual remotes, and the project can pull from the Flipper-IRDB code database. A Python tool converts LIRC files and Pronto hex codes to .ir files. A “Be Gone” mode sends the power commands for a whole category of remotes.

The project is under GPL v3.0, with firmware, wiring diagrams, a bill of materials, assembly notes and the 3D files published. Pre-compiled firmware is offered too.

See more at opensourceforu.com and content on GitHub.

3D printing – Adafruit Industries – Makers, hackers, artists, designers and engineers!

beziworld/laravel-proxmox

http://packalyst.com/assets/img/logo.png

Laravel Proxmox VE

tests
Latest Version
License

Laravel client for the Proxmox VE API: nodes, QEMU
virtual machines and LXC containers (lifecycle, configuration, cloning, snapshots, backups, migration), storage,
asynchronous tasks with a UPID waiter, cluster resources and access control, for one or many clusters.

Polska wersja dokumentacji

Features

  • API tokens (PVEAPIToken=user@realm!id=secret) or username/password tickets with the
    CSRFPreventionToken, cached and renewed automatically
  • Multiple named clusters plus using([...]) for clusters stored in your database
  • TLS verification on by default, per connection verify_ssl true, false or a CA bundle path
    (/etc/pve/pve-root-ca.pem)
  • Guests addressed by VMID: Proxmox::vm(100) finds the node in the cluster resources
  • Every asynchronous call returns a Task (UPID) with wait(), status(), log() and stop(); failures raise
    TaskFailed with the last log lines, long tasks TaskTimeout
  • Typed DTOs (Node, ClusterResource, GuestStatus, Snapshot, TaskStatus, Storage, StorageVolume,
    ApiToken, User) that keep the raw payload
  • Reads retried on connection errors, HTTP 5xx and 595/596, writes never retried; validation errors exposed per
    parameter
  • php artisan proxmox:check and php artisan proxmox:task {upid}
  • PHP 8.3+, Laravel 12 and 13, PHPStan level 8, works with Http::fake() and Sleep::fake()

Why this package

On Packagist (November 2026) corsinvest/cv4pve-api-php has about 1.37M downloads: a complete generated client,
framework-agnostic and curl-based. Laravel packages are rare: irabbi360/laravel-php-proxmox (about 4.6k downloads)
always disables TLS verification, supports only password tickets for a single server and has no task handling;
h1g/proxmox (160 downloads) is a 2016 Laravel 5 binding. This package adds:

  • API token authentication and ticket caching shared by queue workers
  • several clusters, each with its own credentials, node and TLS settings
  • a UPID task waiter, so provisioning flows (clone, configure, start) can be written top to bottom
  • Laravel’s HTTP client (testable with Http::fake()), typed exceptions and DTOs

Installation

composer require beziworld/laravel-proxmox
php artisan vendor:publish --tag=proxmox-config   # optional
PROXMOX_URL=https://pve1.example.com:8006
PROXMOX_TOKEN_ID=automation@pve!laravel          # Datacenter > Permissions > API Tokens
PROXMOX_TOKEN_SECRET=b3c6a8e2-....
PROXMOX_NODE=pve1                                # default node for create/list calls
PROXMOX_VERIFY_SSL=/etc/ssl/pve-root-ca.pem      # true, false or a CA bundle path

# or a ticket login instead of the token:
# PROXMOX_USERNAME=root@pam
# PROXMOX_PASSWORD=
php artisan proxmox:check

API tokens with privilege separation only hold the permissions granted to the token itself: grant a role (for
example PVEVMAdmin on /vms and PVEDatastoreUser on /storage) to the token, not only to its user.

More clusters go into config/proxmox.php:

'connections' => [
    'default' => [...],
    'dc2' => [
        'url' => 'https://dc2-pve1.example.com:8006',
        'token_id' => env('PROXMOX_DC2_TOKEN_ID'),
        'token_secret' => env('PROXMOX_DC2_TOKEN_SECRET'),
        'node' => 'dc2-pve1',
        'verify_ssl' => storage_path('certs/dc2-pve-root-ca.pem'),
    ],
],

Usage

Provision a VM from a template

use Beziworld\Proxmox\Facades\Proxmox;

$vmid = Proxmox::cluster()->nextId();

Proxmox::vm(9000)->clone($vmid, ['name' => 'shop-42', 'full' => true, 'storage' => 'local-lvm'])->wait();

$vm = Proxmox::vm($vmid);
$vm->updateConfig(['memory' => 4096, 'cores' => 2, 'ipconfig0' => 'ip=10.0.0.42/24,gw=10.0.0.1'])?->wait();
$vm->resize('scsi0', '+20G')?->wait();
$vm->start()->wait();

Lifecycle

$vm = Proxmox::vm(100);                      // node looked up in /cluster/resources
$vm = Proxmox::vm(100, 'pve1');              // or given explicitly
$ct = Proxmox::container(200);
$guest = Proxmox::guest(100);                // type and node detected

$vm->status()->isRunning();
$vm->start(); $vm->shutdown(timeout: 120, forceStop: true); $vm->stop();
$vm->reboot(); $vm->reset(); $vm->suspend(); $vm->resume();
$vm->config(); $vm->config(current: true);
$vm->migrate('pve2', online: true)->wait(timeout: 3600);
$vm->convertToTemplate();
$vm->destroy(purge: true);

Snapshots and backups

$vm->snapshot('before-upgrade', 'PHP 8.4 upgrade', withRam: false)->wait();
$vm->snapshots();                              // list<Snapshot>
$vm->rollback('before-upgrade', start: true)->wait();
$vm->deleteSnapshot('before-upgrade');

$vm->backup('pbs', mode: 'snapshot', compress: 'zstd', options: ['notes-template' => ''])->wait();
$vm->backups('pbs');                           // list<StorageVolume>
Proxmox::storage('pve1')->deleteVolume('pbs', $backup->volid);

Tasks (UPID)

$task = $vm->start();                          // Task
$upid = (string) $task;                        // store it, e.g. in a queued job

$status = Proxmox::task($upid)->wait(timeout: 600, interval: 2, onPoll: fn($s) => logger()->info($s->status));
$status->succeeded(); $status->exitStatus;     // "OK", "WARNINGS: 1" or the error message

Proxmox::task($upid)->log();                   // list<string>
Proxmox::tasks()->forNode('pve1', ['vmid' => 100, 'errors' => true]);
Proxmox::tasks()->recent();                    // cluster tasks
php artisan proxmox:task "UPID:pve1:000A1B2C:0123ABCD:6730A1B2:qmstart:100:root@pam:" --timeout=300

Nodes, cluster and storage

Proxmox::nodes()->list();                      // list<Node>
Proxmox::nodes()->status('pve1');
Proxmox::cluster()->resources('vm');           // list<ClusterResource>
Proxmox::cluster()->guests();
Proxmox::cluster()->isIdFree(150);
Proxmox::qemu('pve1')->list();                 // list<GuestStatus>
Proxmox::lxc('pve1')->create([
    'hostname' => 'ct1',
    'ostemplate' => 'local:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst',
    'rootfs' => 'local-lvm:8',
    'net0' => 'name=eth0,bridge=vmbr0,ip=dhcp',
])->wait();
Proxmox::storage('pve1')->list('backup');      // list<Storage>
Proxmox::storage('pve1')->content('local', 'iso');

Access control

$token = Proxmox::access()->createToken('ci@pve', 'deploy', comment: 'CI', expiresAt: now()->addYear());
$token->value;                                 // shown only once, store it
Proxmox::access()->updateAcl('/vms/100', ['PVEVMUser'], tokens: [$token->fullTokenId]);
Proxmox::access()->can('/vms/100', 'VM.PowerMgmt');
Proxmox::access()->users();

Runtime clusters and anything else

Proxmox::using([
    'url' => $cluster->url,
    'token_id' => $cluster->token_id,
    'token_secret' => decrypt($cluster->token_secret),
])->vm(100)->status();

Proxmox::request('GET', '/cluster/ha/resources');
Proxmox::request('POST', '/nodes/pve1/qemu/100/agent/ping');

Exceptions

All exceptions extend Beziworld\Proxmox\Exceptions\ProxmoxException:

Exception When
AuthenticationException Token, ticket or login rejected (HTTP 401). A rejected login is never repeated.
PermissionDenied Missing privilege (HTTP 403)
ApiException Other error status; httpStatus(), errors() (per parameter), payload()
RateLimitException HTTP 429 from a proxy in front of the cluster; retryAfter()
ConnectionFailed DNS, TCP, TLS or timeout error (after read retries)
TaskFailed wait() saw an exit status other than OK; status() and the last log lines
TaskTimeout wait() gave up; the task keeps running (upid())
GuestNotFound VMID not in the cluster resources (or not visible to the token)
InvalidConfiguration Unknown connection, missing URL, credentials or node

Notes

  • Calls are synchronous and tasks such as clones, backups and migrations take minutes: run them in queued jobs and
    keep the UPID, or use wait() with a timeout that fits the job.
  • updateConfig() uses the asynchronous POST endpoint for VMs (needed for hotplug and disk allocation) and
    returns a task only when Proxmox started one.
  • Two-factor authentication is not supported for ticket logins: use an API token.

Development

composer install
composer ci   # pint --test, phpstan (level 8), pest

Author

Created and maintained by Kamil Ćwiertnia, beziworld.eu.

Need an integration? Get in touch through beziworld.eu.

Other packages by the author

License

MIT. See LICENSE.md. This package is not affiliated with, endorsed by or sponsored by Proxmox Server
Solutions GmbH. Proxmox is a registered trademark of Proxmox Server Solutions GmbH.

Packalyst :: Latest Packages

Demoted National Parks: 10 Nearly Forgotten Sites You Can Still Visit Today

https://i0.wp.com/s3.amazonaws.com/images.gearjunkie.com/uploads/2026/11/Untitled-Design-2026-11-09T114609.550.jpg?w=700&ssl=1

Wheeler Geological Area was once a national monument; (photo/John Fowler via Flickr Creative Commons

It’s hard to imagine Yellowstone or the Grand Canyon no longer being national parks, but, technically, it could happen. The government can demote national parks and reassign them to other land managers, and they’ve done it in the past. Many national parks and monuments have lost their elevated classification over the decades, for a multitude of reasons. Sometimes, after the fact, Congress decides the area isn’t important enough to merit a special designation. Other times, the sites just never receive visitors.

Even though these areas lost their special status, the public can still visit many of them and participate in a variety of outdoor activities. Here are some of the National Park Service (NPS) sites time forgot, and how to explore them today.

Former National Parks

Mackinac National Park

This island, located on Lake Huron in between Michigan’s Upper and Lower Peninsulas, became the country’s second-ever national park in 1875. It’s home to Fort Mackinac, the state’s oldest surviving military outpost, which served an important role in the War of 1812.

The NPS wasn’t created until 1916, so the Department of War managed the park. By the 1890s, the base had become militarily unnecessary, and the agency balked at the high cost of maintaining the park. Some in the department wanted to sell the land, but locals revolted, so in 1894 they handed it off to the state of Michigan, which created Mackinac Island State Park.

bikers on road by lake
Biking is a popular activity on the island; (phtoo/Shutterstock)

Visiting today: Mackinac Island has become a beloved summer tourist destination. Visitors flock to the island to enjoy its car-free atmosphere and lake views. The state owns around 80% of the island, preserving its historic character.

The 6.3-mile Tranquil Bluff Trail is one of the most scenic on the island, with clear vistas and excellent bird watching opportunities. The Island is known as the “fudge capital of the world,” and streets abound with vintage-style candy shops that can help fuel your hikes. To understand the island’s plant life, stroll the Botanical Trail, with signage that explains the unique flora here.

Platt National Park

The history of this part of Oklahoma dates back to 1902, when the government purchased 33 mineral springs from the Choctaw and Chickasaw Nations to create the Sulphur Springs Reservation. In 1906, Congress designated it a national park, and spent decades building infrastructure and visitor services. The area was popular because the springs here were one of the few ways to find relief during hot, sweltering summers.

lake with concrete walking path
Platt Historic District Veterans Lake; (photo/NPS/Victoria Stauffenberg)

By the 1960s, the conservation movement supported leaving wild spaces natural, as opposed to the heavy development that had occurred in Platt. Since the area was small and not home to impressive natural features like mountains or rivers Congress combined it with the nearby Arbuckle Recreation Area in 1976 to create the Chickasaw National Recreation Area.

Visiting today: Chickasaw National Recreation Area is still a popular destination, with over 1.8 million visitors in 2025. It can be crowded in the summer, so try visiting in the shoulder seasons (March to May, and September to October) instead. Entry is free.

Deciduous forests meet prairies to create a unique landscape. Hiking trails abound; the 1-mile Antelope Springs trail is perfect for a casual evening stroll by the water. Check out the 2-mile West Bison Pasture Loop for a chance to see the trail’s namesake animal.

There are six campgrounds throughout the park, which cost $20 to $30/night and can be reserved online. Fishing in the area’s creeks is a popular pastime; be sure to follow all Oklahoma state fishing regulations.

Hill National Park

Conservation icon Theodore Roosevelt created this national park in North Dakota in 1904. The area served as an important big-game preserve to save species like bison. Its importance in conservation eventually led President Herbert Hoover to make it a wildlife refuge and transfer it to the agency that would become the U.S. Fish & Wildlife Service (USFWS). In 2019, it was renamed the White Horse Hill National Game Preserve.

prairie dog poking out of a hole
(Photo/Shutterstock)

Visiting today: The refuge is open daily to visitors. No overnight stays are allowed. Slowly drive along a designated 4.5-mile car route for the chance to view bison, elk, and deer. There’s also a large prairie dog town near the visitors’ center that is a short walk away. The area is home to over 210 species of birds, so be sure to bring along your binoculars.

General Grant National Park

In many cases, former NPS sites get transferred to other agencies, but in this case, one park got subsumed into another. In 1890, right after the creation of Sequoia National Park, President Benjamin Harrison created nearby General Grant National Park to protect its giant Sequoias from logging. In 1940, the government created the much larger Kings Canyon National Park, which surrounded General Grant. It didn’t make sense to have one park encircled by another, so Kings Canyon took over the smaller park.

visitors nex to large tree
The General Grant tree dwarfs visitors; (photo/NPS/Rebecca Paterson)

Visiting today: The area, now known as General Grant’s Grove, is open to visitors to Kings Canyon. Park entry requires a $35 fee or an America the Beautiful Pass ($80).

The main highlight is the gigantic tree named after the Civil War hero. General Grant’s tree is the world’s second-largest tree by trunk volume. The larger area is home to many other impressive giant Sequoias, as well as meadows and a small waterfall. Combine the North Grove Loop and Dead Giant Trail for a 2.5-mile journey through the area that also provides views of Sequoia Lake.

Former National Monuments

Papago Saguaro National Monument

Before Saguaro National Park existed, there was Papago Saguaro National Monument. Under the 1906 Antiquities Act, a president can declare a national monument with a stroke of a pen, and President Woodrow Wilson did just that in 1914. The land, which the local Maricopa and Pima Tribes once held, was home to distinct red sandstone rock formations and fields of the namesake cacti. The monument, however, quickly fell into disarray, with inadequate funding for upkeep. By 1930, the government had had enough, and passed the land over to the state.

red sandstone formation
Papago park today; (photo/Vicki Rogers via Flickr Creative Commons)

Visiting today: Papago Park has become a popular outdoor recreation destination for the residents of Phoenix and Tempe. It’s a great spot for a post-work hike; popular trails include the 2.3-mile Double Butte Loop and 2.7-mile Elliot Ramada Loop. Other must-visit attractions inside the park include the Phoenix Zoo and the Desert Botanical Garden.

Lewis & Clark Caverns National Monument

Local deer hunters first noticed this series of caves in Jefferson County, Montana, in 1898. Then, in 1911, President Howard Taft declared the impressive caverns a national monument. During the Great Depression, the Civilian Conservation Corps built much of the infrastructure and tunnels that allowed visitors to tour the caves. In 1937, Congress directed the Secretary of the Interior to hand over the land to the state, because the land did not possess enough “national significance.” It then became Montana’s first state park.

underground cavern with rock formations
Lewis & Clark Caverns State Park; (photo/Troy Smith via Flickr Creative Commons)

Visiting today: Located less than an hour from Bozeman, Lewis & Clark Caverns State Park is a great add-on stop for folks visiting Yellowstone National Park. Be sure to book a guided tour in advance, since it’s the only way to tour the massive limestone caves. Above ground, other popular activities include hiking and biking trails, fishing and canoeing on the Jefferson River, and birdwatching. There’s also campsites and cabins available for reservation online. The best time to visit is May through September.

Father Millet Cross National Monument

The nation’s smallest national monument was also one of its most short-lived. In the late 1600s, a group of French colonists endured a harrowing winter at a fort near Niagara Falls, where many died of starvation. In 1688, Father Pierre Millet, a missionary, had a cross erected there to remember the dead. In 1925, President Coolidge ordered a new cross built on the same site, and declared the 18-square-foot portion of land a national monument.

In 1949, Congress declared the tiny plot “extraneous,” and handed it over to New York as part of Fort Niagara State Park and Old Fort Niagara State Historic Site.

group of historic reenactors at fort site
A historic reenactment; (photo/gardener41 via Flickr Creative Commons)

Visiting today: The Father Millet Cross is just one of many pieces of history visitors to the state park can learn about. The French first established Fort Niagara in 1679, and it served as an important military outpost during the French & Indian War and the War of 1812. It served as an active military outpost until 1963, and visitors can tour the grounds and learn from historical interpreters and reenactors. Admission to the historic site costs $17 per adult, while admission to the larger state park costs $8 per vehicle.

Wheeler National Monument

Unique geology is sometimes the reason behind an area’s elevation to national monument status, and Wheeler National Monument is a prime example. Located in the San Juan Mountains in southern Colorado, eruptions from super volcanoes millions of years ago produced to unusual rock and tufa formations, spires, and needles. President Roosevelt signed its special status into law in 1908. The U.S. Forest Service (USFS) managed it until 1933, when the NPS took over. In 1950, Congress demoted it, and passed it back to the USFS. The area was extremely remote and difficult to access, and thus attracted very few visitors.

unusual rock formations and spires
(Photo/John Fowler via Flickr Creative Commons)

Visiting today: Wheeler Geological Area is now part of the La Garita Wilderness in the Rio Grande National Forest. Getting there involves a 7-mile hike or a rough 14-mile off-road drive. The USFS advises visitors to devote a full, long day to the trip.

For those considering driving, be prepared. “The road is extremely rough with deep ruts, narrow turns, and some steep hills. High-clearance 4×4 vehicles or ATVs are recommended. This road is not recommended for travel during monsoonal storms,” USFS warns.

Camping is not allowed among the formations, but you can disperse camp nearby for free at Hansen Mill site and at the end of Wheeler Road #600. If you’re looking for a unique, remote weekend backpacking trip, Wheeler deserves to be on your list.

Holy Cross National Monument

Mount of the Holy Cross, a 14er located in the Sawatch Range of the Rocky Mountains in Colorado, got its name for the distinctive cross-shaped snowfield on its face. President Hoover made it a national monument in 1929 in order to protect it. Unsurprisingly, given its remote location and high elevation, it didn’t bring in many visitors. In 1950, Congress handed it over to the Forest Service, and in 1980, it became a designated wilderness area.

mountain with snow
(Photo/Orion Wiseman via Flickr Creative Commons)

Visiting today: The climb up this 14,007-foot peak starts at the Half Moon Pass trailhead (10,320 feet). The 11.25-mile round-trip journey is strenuous, with over 8,000 feet of elevation gain. Weather can quickly turn for the worse, so be prepared with adequate layers and protection. The road to the trailhead is closed annually from May 1 to June 21, and its reopening date depends on when it’s cleared of snow.

Old Kasaan National Monument

National monuments often serve to protect important cultural or historic sites, and that was President Wilson’s intention when he created Old Kasaan National Monument in Alaska in 1916. The area on Prince of Wales Island was formerly a major settlement for the Haida, an Native American tribe in Alaska and Canada whose history there spanned thousands of years. Despite its monument status, Old Kasaan fell into neglect, with no resources spent on restoration.

In 1955, Congress transferred it to the USFS, which manages it as part of Tongass National Forest.

foggy mountain with wooden planks in ground
The island is quite remote; (photo/Cori Jessy via Flickr Creative Commons)

Visiting today: The Organized Village of Kasaan, run by the tribal government, offers guided tours of the Totem Pole Park and Náay I’waans Whale House. The village also owns and operates two cabins for rent located near the forest, with views of the ocean.

GearJunkie

Introducing FlockPHP v1.0! A free, open-source Laravel Herd alternative for macOS, Windows & Linux!

https://flockphp.com/images/share.png?v=1792349032

Price

Yes:

Free, open source, no account

$
Paid:

Free core, services need Pro ($99/yr)

Platforms

Yes:

macOS, Windows and Linux, native apps

Partly:

macOS and Windows, no Linux yet

Runs natively

Yes:

Native processes, no VM or containers

Yes:

Native, nginx and PHP-FPM

PHP versions

Yes:

8.1 to 8.5 side by side

Yes:

7.4 up to 8.6 (release candidate)

PHP per project

Yes:

Pinned in .flockrc or isolated per site

Yes:

Isolated per site

.test domains

Yes:

Built-in DNS, subdomains included

Yes:

Automatic

Trusted HTTPS

Yes:

Root limited to .test, no warnings

Yes:

One click or command per site

Databases

Yes:

PostgreSQL, MySQL, MariaDB, MongoDB

$
Paid:

Pro only

Cache, search, storage

Yes:

Valkey, Meilisearch, Typesense, RustFS

$
Paid:

Pro only

Database UI

No:

Use your own client

No:

Not included

Mail catcher

Yes:

An inbox per app, HTML preview

$
Paid:

Pro only

Dumps and logs

Yes:

Per-request timeline and Laravel log

$
Paid:

Pro only, in Insights

Xdebug

Yes:

Turns on when you set a breakpoint

Partly:

Bundled, set up in php.ini; auto in Pro

Node.js

Yes:

Per project from .nvmrc

Yes:

Per site through nvm

Other languages

No:

PHP and Node.js only

No:

PHP and Node.js only

FrankenPHP and Octane

Yes:

Per site, with Octane worker mode

No:

nginx with PHP-FPM

Public preview link

Yes:

Cloudflare tunnel, one command

Yes:

Through Expose

AI agentic development

Yes:

Built-in MCP server

Yes:

MCP server built in, runtime context Pro

Git worktrees

Yes:

Served and set up on their own, database included

Yes:

Workspaces, registered with herd workspace

Laravel News Links

Googling “Zelda” today offers a glimpse of how search worked in 1998

https://cdn.arstechnica.net/wp-content/uploads/2026/11/zelda-google-1152×648.jpg

The year was 1998. Britney Spears topped the charts, Bill Clinton was impeached, and a couple of little websites called Google and Ars Technica came online. It was also the year Nintendo released The Legend of Zelda: Ocarina of Time on the Nintendo 64. Google, which has come to dominate the Internet (Ars is still working on that), is celebrating the imminent release of the Ocarina of Time remaster by temporarily transporting us back to that storied year with a search Easter egg.

To access the Google time machine, you just have to search for either "Zelda" or "Ocarina of Time." Google will load the standard 2026 results page, but you’ll see an animated Master Sword in the lower right corner. It appears on both mobile and desktop—just click the sword and enjoy the show.

After a little time-skipping animation and a Link shout (you know the one), you’ll swear it’s 1998 again. The search page is transformed into a simple list of blue links with retro Google branding. This is particularly apt given the time-shifting mechanics in Ocarina of Time.

Read full article

Comments

Ars Technica – All content

PureSelfMade’s Build-Your-Own Wind Turbine Workshops

https://s3files.core77.com/blog/images/1855853_81_145808_YGNwuzuXf.jpg

Since the 1970s, self-taught engineer Hugh Piggott has been building wind turbines from scratch in his native Scotland. In the 2000s, he started holding workshops showing participants how to build their own. Jonathan Schreiber, an Austrian renewable-energy practitioner, took Piggott’s course in 2012.

Piggott no longer teaches, but now Schreiber has picked up the mantle. He formed PureSelfMade, an independent-energy education project, and since 2013 has hosted workshops showing participants how to build Piggott’s design.

At these workshops, you do not assemble a wind turbine kit. Instead you literally build the entire thing, including the generator, from scratch. You learn to carve the blades, wind copper wire to make the coils, use an angle grinder to cut the steel, et cetera:

PureSelfMade’s upcoming wind turbine workshops are held in Germany and Austria, and conducted in German. They’re also working on setting up English-language workshops in the UK. 

Core77

Dividend Reinvestment Calculator: $10,000 in SPY Became $83,195 With DRIP vs $59,123 Without (Python)

https://blog.finxter.com/wp-content/uploads/2026/11/dividend-reinvestment-calculator-drip-edge-by-etf.png

Short answer: $10,000 put into SPY on January 3, 2000 grew to $83,195 by October 30, 2026 with every dividend reinvested. Taking the dividends as cash left you with $59,123: $51,962 in shares plus $7,161 in collected dividends. That makes reinvesting worth $24,072, or 41% more money, on a fund that yields only about 1% a year.

This dividend reinvestment calculator doesn’t assume a smooth 7% return. It replays every real SPY, VYM, SCHD and QQQ dividend from Yahoo Finance, day by day, with and without reinvestment. The Python script is below, so you can run it on your own tickers.

TL;DR

  • $10,000 in SPY from Jan 2000: $83,195 with dividends reinvested vs $59,123 taking cash, a +$24,072 (41%) edge.
  • Since SPY’s 1993 launch: $314,411 vs $197,803, +59%. Edge scales with yield × years (QQQ +14%, VYM +43%).
  • The DRIP account was behind in 2000–2002 and 2008, and ahead only 3.2% by 2011. The payoff came in the second decade.
  • With $500/month added: $1,049,823 vs $846,717, a $203,106 gap.
  • Reinvested dividends are still taxed in taxable accounts; a 15% rate cut the result to $77,535. Python script included.

How the calculator works (assumptions labeled)

The script, drip.py, does what a broker’s DRIP does, and labels its simplifications:

  • Data: daily closes plus per-share dividends from Yahoo Finance via yfinance, through October 30, 2026.
  • Assumption 1: each dividend is reinvested at the close on its ex-date. Real brokers buy on the payment date, a few days later. That’s a small difference over 27 years.
  • Assumption 2: in the “no DRIP” case the cash just sits there at 0%. This is the honest version of “I’ll spend it or leave it in the account”.
  • Assumption 3: no taxes or fees unless I say so. Taxes get their own section below.

As a sanity check, Yahoo’s dividend-adjusted price series turns the same $10,000 into $83,131. My day-by-day replay lands at $83,195, a 0.1% difference. So the replay matches total return.

The results: DRIP vs cash, five real histories

ETF Start Years $10,000 with DRIP $10,000, dividends as cash DRIP edge
SPY Jan 03, 2000 26.8 $83,195 (8.22%/yr) $59,123 (6.85%/yr) +$24,072 (+41%)
SPY Jan 29, 1993 33.7 $314,411 (10.76%/yr) $197,803 (9.25%/yr) +$116,608 (+59%)
VYM Nov 16, 2006 20.0 $59,485 (9.35%/yr) $41,668 (7.41%/yr) +$17,818 (+43%)
SCHD Oct 20, 2011 15.0 $69,132 (13.73%/yr) $54,081 (11.89%/yr) +$15,050 (+28%)
QQQ Jan 03, 2000 26.8 $86,575 (8.38%/yr) $75,786 (7.84%/yr) +$10,789 (+14%)
Yahoo Finance daily closes + dividends to Oct 30, 2026; cash case = shares + uninvested dividends at 0%; no taxes or fees. drip.py

The SPY row is the headline. Without reinvestment you still owned your original 68.8 shares. With it, quarterly dividends quietly bought another 41 shares, so you finish with 110.1 shares. Each of those shares is now worth about $756 and pays its own dividends.

Go back further and the gap widens. From SPY’s first trading day in January 1993, $10,000 grew to $314,411 with DRIP versus $197,803 without. That’s $116,608 (59%) more, and the only difference is what you did with a 1–2% yield.

Bar chart of how much more $10,000 ended with dividends reinvested vs taken as cash: QQQ 2000-26 +14% ($10,789), SCHD 2011-26 +28% ($15,050), SPY 2000-26 +41% ($24,072), VYM 2006-26 +43% ($17,818), SPY 1993-26 +59% ($116,608)
The DRIP edge scales with yield and years: from +14% for low-yield QQQ to +59% for SPY since 1993 (drip.py, Yahoo Finance data).

Two dials decide how much reinvesting adds:

  1. Yield. QQQ paid only 0.45% over the last 12 months, so 27 years of reinvesting added just 14%. VYM, at 2.25%, added 43% in only 20 years.
  2. Time. SCHD yields the most (2.95%), but its history only starts in October 2011. Fifteen years of reinvesting added 28% ($15,050). It simply hasn’t had SPY’s 33 years yet.

Napkin rule: the DRIP edge grows roughly with yield × years. A 1% yield over 27 years (SPY) and a 2.25% yield over 20 years (VYM) both landed near +41–43%.

The surprise: reinvesting barely mattered for 12 years

Here’s the part no compound-interest calculator shows you. Reinvesting doesn’t pull ahead in a straight line. In the SPY run that started in 2000, the DRIP account was behind the cash account at the end of 2000, 2001, 2002 and 2008.

Animated bar chart of the DRIP account's lead over the cash account for $10,000 in SPY, year by year from 2000: slightly negative in 2000-2002 and -3.2% in 2008, 3.2% in 2011, 10.3% in 2013, 26.2% in 2020 and 40.7% by Oct 2026
Reinvesting barely mattered for 12 years (−3.2% in 2008), then compounding took the lead to 40.7%.

The reason is simple. Every dividend reinvested in 2000–2002 bought shares that then fell during the dot-com crash. The cash version held those dollars at full value. At the end of 2008 the DRIP account was 3.2% behind. Its lead was still only 3.2% at the end of 2011.

After that, compounding took over. The lead hit 10% in 2013, 26% in 2020, and 40.7% by October 30, 2026. If you check your DRIP after a few years and see nothing, that’s normal. The payoff comes in the second decade.

It also explains why the 60/40 portfolio’s max drawdown and the time to recover from a crash both matter here. A DRIP buys more shares when prices are low, but it only pays off if you keep holding until the recovery.

The income you end up with

People rarely reinvest for the final balance alone. They want a larger dividend check later. So the calculator multiplies the last 12 months of per-share payouts by the shares you hold now:

Grouped bar chart of yearly dividend income today from one $10,000 start, cash vs reinvested: QQQ $326 vs $388, SPY $521 vs $835, VYM $728 vs $1,335, SCHD $1,267 vs $2,038
Reinvested shares pay their own dividends: SPY income is 60% higher ($835 vs $521 a year).

From one $10,000 start, SPY now pays $835 a year to the DRIP investor versus $521 to the cash investor, 60% more income from the same original money. SCHD pays $2,038 versus $1,267. With reinvestment, each new share pays dividends too, so the income grows on its own.

With monthly contributions the gap reaches six figures

Most people don’t invest once and walk away. So I ran the calculator again with $10,000 up front plus $500 on the first trading day of every month into SPY from January 2000. That’s $170,500 contributed in total (the same approach as the monthly plan in my lump sum vs DCA on the S&P 500 backtest).

SPY scenario (Jan 2000–Oct 2026) Contributed With DRIP Dividends as cash Gap
$10,000 once $10,000 $83,195 $59,123 +$24,072 (+41%)
$10,000 + $500/month $170,500 $1,049,823 $846,717 +$203,106 (+24%)
$10,000 once, 15% tax on dividends (assumption) $10,000 $77,535 n/a −$5,660 vs untaxed DRIP
drip.py on Yahoo Finance data. Tax row is a labeled assumption, not advice.

With reinvestment the account crosses $1,049,823. Without it, it reaches $846,717. The difference is $203,106, more than the total amount contributed. Monthly money shrinks the gap in percentage terms (24% vs 41%), because fresh cash hasn’t had time to compound. In dollars, though, the gap grows a lot.

Taxes: reinvesting doesn’t dodge them

In a taxable US account, the IRS treats reinvested dividends exactly like cash dividends. Publication 550 says that if you use your dividends to buy more stock, “you must still report the dividends as income”. So DRIP isn’t a tax strategy. It’s a compounding strategy.

Qualified dividends are taxed at long-term capital gain rates (IRS Topic 404). For 2025 those rates are 0%, 15% or 20% depending on taxable income, and “no higher than 15% for most individuals” (IRS Topic 409).

Assumption: a flat 15% on every SPY dividend, with tax paid out of the dividend before reinvesting. The DRIP result falls from $83,195 to $77,535, a $5,660 drag over 27 years. In a tax-advantaged account like an IRA or 401(k), there’s no yearly drag and the untaxed numbers above apply.

Don’t double count: if you test DRIP yourself, replay dividends on the raw close, or use the adjusted close alone. Doing both counts every dividend twice and inflates the result.

The Python dividend reinvestment calculator

Install yfinance and pandas, then save the prices once (so reruns don’t hit Yahoo every time) and run the script:

import yfinance as yf, pandas as pd
d = {t: yf.Ticker(t).history(start="1993-01-01", end="2026-11-01", auto_adjust=False, actions=True)
     for t in ["SPY", "SCHD", "VYM", "QQQ"]}
pd.to_pickle(d, "src/prices.pkl")

auto_adjust=False keeps the raw (split-adjusted) close and the separate Dividends column. If you replayed dividends on top of the dividend-adjusted close, you’d count them twice.

"""Dividend reinvestment calculator: replay real ETF history (Yahoo Finance closes + dividends),
with vs without reinvesting dividends, optional monthly contributions and dividend tax."""
import pandas as pd

def load(path="src/prices.pkl"):
    d = pd.read_pickle(path)
    return {t: h[["Close", "Dividends"]].tz_localize(None).loc[:"2026-10-30"] for t, h in d.items()}

def drip(h, start, initial=10_000, monthly=0, reinvest=True, tax=0.0):
    """Daily replay. Dividends paid on the ex-date at that day's close (a common approximation)."""
    h = h.loc[start:]
    shares, cash, paid, invested, month, rows = 0.0, 0.0, 0.0, 0.0, None, []
    for day, (px, div) in h.iterrows():
        if month is None:
            shares, invested = initial / px, initial
        elif day.month != month and monthly:
            shares += monthly / px; invested += monthly
        month = day.month
        if div > 0:
            net = shares * div * (1 - tax); paid += net
            if reinvest: shares += net / px
            else: cash += net
        rows.append((day, shares * px + cash, shares * px, cash, invested, paid))
    return pd.DataFrame(rows, columns=["date", "total", "stock", "cash", "invested", "divs"]).set_index("date")

def cagr(s):
    yrs = (s.index[-1] - s.index[0]).days / 365.25
    return (s.iloc[-1] / s.iloc[0]) ** (1 / yrs) - 1

if __name__ == "__main__":
    P = load()
    for t, start in (("SPY", "2000-01-03"), ("SPY", "1993-01-29"), ("SCHD", "2011-10-20"), ("VYM", "2006-11-16"), ("QQQ", "2000-01-03")):
        a, b = drip(P[t], start), drip(P[t], start, reinvest=False)
        yrs = (a.index[-1] - a.index[0]).days / 365.25
        print(f"{t} {a.index[0]:%b %Y}-{a.index[-1]:%b %Y} ({yrs:.1f} yrs) $10k: DRIP ${a.total.iloc[-1]:,.0f} "
              f"(CAGR {cagr(a.total):.2%}) | no DRIP ${b.total.iloc[-1]:,.0f} = ${b.stock.iloc[-1]:,.0f} shares + ${b.cash.iloc[-1]:,.0f} cash "
              f"(CAGR {cagr(b.total):.2%}) | DRIP edge ${a.total.iloc[-1]-b.total.iloc[-1]:,.0f} ({a.total.iloc[-1]/b.total.iloc[-1]-1:.0%}) | "
              f"shares {a.stock.iloc[-1]/P[t].Close.iloc[-1]:.1f} vs {b.stock.iloc[-1]/P[t].Close.iloc[-1]:.1f}")
    a = drip(P["SPY"], "2000-01-03", monthly=500); b = drip(P["SPY"], "2000-01-03", monthly=500, reinvest=False)
    print(f"SPY 2000 $10k + $500/mo (invested ${a.invested.iloc[-1]:,.0f}): DRIP ${a.total.iloc[-1]:,.0f} | no DRIP ${b.total.iloc[-1]:,.0f}")
    t15 = drip(P["SPY"], "2000-01-03", tax=0.15)
    print(f"SPY 2000 $10k DRIP with 15% dividend tax: ${t15.total.iloc[-1]:,.0f}")
    # annual dividend income at the end (last 12 months of per-share payouts x shares held)
    for t, start in (("SPY", "2000-01-03"), ("VYM", "2006-11-16"), ("SCHD", "2011-10-20"), ("QQQ", "2000-01-03")):
        ttm = P[t].Dividends.loc["2025-10-31":].sum(); px = P[t].Close.iloc[-1]
        a, b = drip(P[t], start), drip(P[t], start, reinvest=False)
        print(f"{t} trailing-12m payout ${ttm:.3f}/share = {ttm/px:.2%} yield; yearly income DRIP ${ttm*a.stock.iloc[-1]/px:,.0f} vs no DRIP ${ttm*b.stock.iloc[-1]/px:,.0f}")

Output on October 30, 2026 data:

SPY Jan 2000-Oct 2026 (26.8 yrs) $10k: DRIP $83,195 (CAGR 8.22%) | no DRIP $59,123 = $51,962 shares + $7,161 cash (CAGR 6.85%) | DRIP edge $24,072 (41%) | shares 110.1 vs 68.8
SPY Jan 1993-Oct 2026 (33.7 yrs) $10k: DRIP $314,411 (CAGR 10.76%) | no DRIP $197,803 = $171,999 shares + $25,804 cash (CAGR 9.25%) | DRIP edge $116,608 (59%) | shares 416.0 vs 227.6
SCHD Oct 2011-Oct 2026 (15.0 yrs) $10k: DRIP $69,132 (CAGR 13.73%) | no DRIP $54,081 = $42,970 shares + $11,111 cash (CAGR 11.89%) | DRIP edge $15,050 (28%) | shares 1932.1 vs 1201.0
VYM Nov 2006-Oct 2026 (20.0 yrs) $10k: DRIP $59,485 (CAGR 9.35%) | no DRIP $41,668 = $32,449 shares + $9,218 cash (CAGR 7.41%) | DRIP edge $17,818 (43%) | shares 363.3 vs 198.2
QQQ Jan 2000-Oct 2026 (26.8 yrs) $10k: DRIP $86,575 (CAGR 8.38%) | no DRIP $75,786 = $72,875 shares + $2,911 cash (CAGR 7.84%) | DRIP edge $10,789 (14%) | shares 125.4 vs 105.5
SPY 2000 $10k + $500/mo (invested $170,500): DRIP $1,049,823 | no DRIP $846,717
SPY 2000 $10k DRIP with 15% dividend tax: $77,535
SPY trailing-12m payout $7.583/share = 1.00% yield; yearly income DRIP $835 vs no DRIP $521
VYM trailing-12m payout $3.676/share = 2.25% yield; yearly income DRIP $1,335 vs no DRIP $728
SCHD trailing-12m payout $1.055/share = 2.95% yield; yearly income DRIP $2,038 vs no DRIP $1,267
QQQ trailing-12m payout $3.091/share = 0.45% yield; yearly income DRIP $388 vs no DRIP $326

To use it for your own holdings, change the ticker, start, initial, monthly and tax. If you also want to see whether your picks beat the index after dividends, my guide to comparing your portfolio to the S&P 500 uses the same total-return logic.

What to do with this

Question What the data says What to do
How much is DRIP worth? +14% (QQQ) to +59% (SPY since 1993) more ending value Turn it on unless you need the income
When does it pay off? SPY lead ≤3.2% through 2011, 40.7% by 2026 Judge it after a decade, not a year
Does it help income? SPY: $835 vs $521 a year from the same $10k Reinvest during accumulation, take cash later
Does it avoid tax? No: reinvested dividends are still taxable (IRS Pub 550) Prefer IRA/401(k) for high-yield funds
Is high yield better? QQQ (0.45% yield) still ended at $86,575 vs SPY $83,195 Pick funds on total return, not yield
Sources: drip.py on Yahoo Finance data; IRS Publication 550, Topics 404 and 409. History, not a forecast.
  1. Turn DRIP on in tax-advantaged accounts unless you need the income now. Across these five histories, that one setting was worth 14–59% more money.
  2. In taxable accounts, reinvest anyway if you were going to reinvest by hand. The tax is the same either way. DRIP just stops cash from sitting idle.
  3. Judge it after 10+ years, not 3. The SPY run was behind or within about 3% of the cash version for its first 12 years.
  4. Don’t chase yield for the DRIP edge alone. QQQ’s tiny 0.45% yield still finished with a higher DRIP balance than SPY ($86,575 vs $83,195), because price growth did the work.

Limitations: ex-date reinvestment, 0% on idle cash, no fees, and one 15% tax assumption. SCHD and VYM have shorter histories. This is history, not a forecast, and not investment advice.

From calculator to finance ebook

If you’ve worked through numbers like these, you already have the outline of a short, useful ebook: “DRIP vs cash, with real data”. You could use it as a lead magnet for a finance newsletter or sell it on KDP. ImagineYourBook is an AI book-writing tool that turns a prompt or your notes into a complete draft with a designed cover and Word and EPUB downloads. It also has a Manuscript Rewrite feature for updating an existing book, for example when next year’s dividend data comes in.

Takeaway: reinvesting SPY’s roughly 1% yield turned $10,000 into $83,195 instead of $59,123. The edge was invisible for 12 years and worth 41% after 27. Run the script on your own tickers, keep DRIP on, and give it a decade.

If you want to package what you learned into a book, ImagineYourBook‘s trial is $0 today with a card required. It includes one 10,000-word Small Book, the first $29.99 charge comes after 7 days, and you can cancel any time before day 8. Treat the result as a draft: check every number before you publish.

Sources (checked November 2, 2026): Yahoo Finance: SPY · VYM · SCHD · QQQ · yfinance on GitHub · IRS Publication 550 · IRS Topic 404 · IRS Topic 409 · ImagineYourBook pricing and trial terms. Script: drip.py (shown above). Not investment advice.

Be on the Right Side of Change