Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Etcd Php Laravel Package

start-point/etcd-php

PHP client for etcd v3 with a simple API for KV operations, leases, and authentication/roles/users. Install via Composer and connect to an etcd endpoint to put/get/delete keys, query prefixes, manage leases, and handle auth tokens.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Distributed Configuration Management: Enable dynamic, real-time configuration updates across Laravel microservices or multi-region deployments (e.g., feature flags, environment variables, or service endpoints). Replace static config/ files with Etcd-backed values for zero-downtime updates.
  • Service Discovery & Load Balancing: Integrate Etcd as a centralized registry for Laravel services (e.g., queues, APIs, or cron jobs). Automate failover and scaling by watching Etcd for service health/availability changes.
  • Leader Election & Coordination: Implement distributed locks (e.g., for Laravel queues, cron jobs, or database migrations) using Etcd leases. Avoid race conditions in multi-process environments (e.g., Laravel Horizon workers).
  • Build vs. Buy: Avoid reinventing a custom Etcd client for PHP/Laravel. This package reduces development time and technical debt by providing a pre-built, MIT-licensed solution.
  • Roadmap Prioritization: Fast-track features requiring distributed coordination (e.g., multi-region deployments, A/B testing, or canary releases) without blocking on custom infrastructure.
  • Security & RBAC: Centralize authentication/authorization for microservices via Etcd’s role-based permissions (e.g., restrict access to admin dashboards or internal APIs).
  • Hybrid Cloud/Edge: Use Etcd for consistent state management across on-premise, cloud, and edge deployments (e.g., Laravel Vapor + Etcd for global config sync).
  • Cost Optimization: Replace proprietary solutions (e.g., Consul Enterprise) with open-source Etcd for non-critical coordination needs.

When to Consider This Package

Adopt If:

  • Your Laravel/PHP stack needs Etcd v3 for distributed systems (e.g., config, service discovery, or coordination) and you prioritize simplicity over cutting-edge features.
  • You require a lightweight PHP client with no active maintenance burden for core functionality (MIT-licensed, minimal dependencies).
  • Your use case fits Etcd v3.3 (2017) capabilities (e.g., KV store, leases, basic auth) and doesn’t need v3.5+ features (e.g., watch prefixes, user auth, or compacted history).
  • You’re using Etcd for non-critical paths (e.g., internal tools, staging, or non-production environments) where stale dependencies are acceptable.
  • Your team lacks resources to maintain a custom Etcd client or integrate with Go/JavaScript alternatives.

Look Elsewhere If:

  • You need active maintenance (last release: 2017). Consider:
  • Your use case demands Etcd v3.5+ features (e.g., watch prefixes, user authentication, or advanced TTL management).
  • You’re building a public-facing product where security/compliance demands up-to-date dependencies (e.g., TLS 1.3, modern PHP practices).
  • You prefer official clients (e.g., Etcd’s Go client or JavaScript client).
  • Your team has high-throughput needs (>10K writes/sec), where raw gRPC (etcd3) may outperform this HTTP wrapper.
  • You need deep Laravel integration (e.g., native Cache, Config, or Queue support) without building custom abstractions.

How to Pitch It (Stakeholders)

For Executives:

*"This PHP client for Etcd v3 lets us leverage a battle-tested, distributed coordination system to modernize our Laravel stack—enabling dynamic configuration, service discovery, and leader election without reinventing the wheel. It’s MIT-licensed, lightweight, and integrates seamlessly with our existing PHP codebase.

Why now?

  • Reduce tech debt: Avoid custom Etcd clients or proprietary tools (e.g., Consul Enterprise).
  • Accelerate features: Enable multi-region deployments, A/B testing, or canary releases with minimal dev effort.
  • Centralize control: Manage authentication/authorization for microservices via Etcd’s RBAC.
  • Cost-effective: Open-source alternative to paid solutions for non-critical coordination.

Risks mitigated:

  • We’ll pilot in non-production first and monitor for compatibility issues.
  • If critical gaps emerge (e.g., missing Etcd v3.5+ features), we’ll fork or migrate to a maintained alternative.
  • Security: We’ll enforce TLS for Etcd connections and audit for PHP vulnerabilities.

Ask: Approve a 6-month trial for internal tools, with a plan to expand to production if successful."*


For Engineering:

*"The start-point/etcd-php package provides a straightforward way to interact with Etcd v3 from Laravel/PHP, covering:

  • Key-Value Store: Dynamic configs, service metadata, or transient state (e.g., feature flags, cache).
  • Leases: Distributed locks for Laravel queues, cron jobs, or database migrations.
  • Auth/RBAC: Secure multi-service access via roles/users/tokens.

Use Cases for Laravel:

  1. Dynamic Configuration:
    • Replace config('database.url') with Etcd-backed values (e.g., Etcd::get('config/database/url')).
    • Use watches to trigger real-time updates (e.g., reload configs without restarting workers).
  2. Service Discovery:
    • Register Laravel services (e.g., queues, APIs) in Etcd and watch for changes to auto-scale or failover.
    • Example: Store {"service": "api", "host": "10.0.0.1", "healthy": true} and let load balancers query Etcd.
  3. Distributed Locks:
    • Use leases to prevent duplicate jobs in Laravel queues (e.g., etcd-php + laravel-queue).
    • Example: Acquire a lease for locks/job:send-email before processing.
  4. Hybrid Cloud:
    • Sync configs across on-premise, Vapor, and edge deployments with strong consistency.

Tradeoffs:

  • No Etcd v3.5+ features: Missing watch prefixes, user auth, or compacted history (but sufficient for our current roadmap).
  • Stale codebase: Last release in 2017; we’ll monitor for forks or plan to migrate if critical.
  • Manual Laravel integration: Need to build facades/repositories for Cache, Config, or Queue (e.g., EtcdConfigRepository).

Proposal:

  1. Phase 1 (2 weeks): Set up Etcd cluster + integrate etcd-php for non-critical configs (e.g., staging feature flags).
  2. Phase 2 (4 weeks): Build Laravel abstractions (e.g., EtcdCache, EtcdConfig) and test in QA.
  3. Phase 3 (ongoing): Expand to service discovery and queue coordination.

Alternatives Considered:

  • spatie/laravel-etcd: Also unmaintained; no clear advantage.
  • Go/JS clients: Overkill for PHP-only stacks; adds interop complexity.
  • Custom gRPC: Higher dev cost for minimal benefit.

Next Steps:

  • Approve Etcd cluster setup (3-node HA with TLS).
  • Allocate 2 devs for initial integration (focus on configs first).
  • Define fallback strategy (e.g., local cache if Etcd is down)."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels