Evento Framework
  • Introduction
  • Architecture Overview
    • Distributed Systems & Microservices
    • Recative Manifesto & Reactive Principles
    • State-of-the-art Patterns
      • DDD (Domain Driven Design)
      • CQRS (Command Query Responsability Separation)
      • Event Sourcing
      • Messaging
      • Saga
  • GETTING STARTED
    • Quick Start
    • TodoList - RECQ Tutorial
      • Problem Description and Requirement Gathering
      • RECQ Payload Design
      • RECQ Components Design
      • Set up your Development Environment
      • RECQ Payload Evento Implementation
        • Domain Commands
        • Domain Events
        • Views
        • Queries
      • RECQ Components Evento Implementation with Spring Data
        • TodoListAggregate
        • TodoList Model with Spring Data
        • TodoListProjector
        • TodoListProjection
        • TodoList Invoker
      • Expose the RECQ architecture with Spring Web
      • Test Your App
    • Extend TodoList - Handle Complexity Tutorial
      • Unique identifier generation
      • Extends behaviors with Observer and Services
      • Cross Domain Consistency with Sagas
      • Handle Real time data updates with MQTT and Save-Notify Pattern
  • RECQ Patterns
    • RECQ Patterns
    • RECQ System Pattern
      • Component
      • Message Gateway
      • System State Store
    • RECQ Communication Pattern
      • Component to Component
      • Component to System State Store
      • System State Store to Component
    • RECQ Component Pattern
      • Aggregate
      • Projector
      • Projection
      • Service
      • Invoker
      • Saga
      • Observer
  • Evento Framework
    • Evento Framework Introcution
    • Payload and Messages
      • Command
        • Domain Command
        • Service Command
      • Event
        • Domain and Service Event
      • Query and View
    • @Component
      • @Aggregate
        • Aggregate State
        • @AggregateCommandHandler
        • @EventSourcingHandler
      • @Projector
        • Projector @EventHandler
      • @Projection
        • @QueryHandler
      • @Service
        • @CommandHandler
      • @Invoker
      • @Saga
        • SagaState
        • @SagaEventHandler
      • @Observer
    • Dead Event Queues
    • EventoBundle
      • EventoServerMessageBusConfiguration
      • ConsumerStateStore
        • InMemoryConsumerStateStore
        • PostgresConsumerStateStore
        • MysqlConsumerStateStore
      • Context
      • TracingAgend and @Track
        • SentryTracingAgent
      • Autoscaling Protocol
        • ThreadCountAutoscalingProtocol
      • Injector and @Component
  • Evento Server
    • Evento Server Introduction
    • SetUp Evento Server
      • Advanced Options
      • Evento Event Store Modes: APES and CPES
    • Evento Server Cluster
    • Bundle Deploy Script
  • EVENTO GUI
    • Explore RECQ Systems Visually
    • GUI Auth
    • Payload Catalog
    • Component Catalog
    • Bundle Catalog
    • Cluster Status (Experimental)
    • Flows
      • Performance Evaluation
    • Application Graph
    • System State Store
  • Evento CLI
    • Evento CLI Introduction
    • Update Version
    • Publish
Powered by GitBook
On this page
  1. Evento Server

Evento Server Cluster

PreviousEvento Event Store Modes: APES and CPESNextBundle Deploy Script

Last updated 12 months ago

In the ever-growing landscape of distributed systems, handling increased load and ensuring high availability are paramount concerns. Fortunately, Evento Server offers the capability to be clustered, allowing you to deploy multiple instances for enhanced scalability and fault tolerance.

Clustered Architecture: Sharing the Burden

Evento Server can be configured as a cluster, utilizing a shared PostgreSQL database. This approach leverages the Shared Database pattern:

  • Shared Database: A single PostgreSQL instance serves as the central repository for all cluster members. This database stores configuration, event streams, and other critical data for all Evento Server instances within the cluster.

  • Multiple Evento Server Instances: You can deploy multiple Evento Server instances, each communicating with the shared PostgreSQL database. This distribution of workload across multiple servers enhances processing power and scalability.

Alternative: PostgreSQL Cluster

While the Shared Database pattern is a viable option, you can also leverage a dedicated PostgreSQL cluster for increased fault tolerance. In this scenario, the Evento Server instances would connect to the cluster endpoint, ensuring data redundancy and availability even if individual PostgreSQL nodes experience failures.

Benefits of Clustering:

  • Scalability: Distribute workload across multiple servers to handle increased message traffic and application complexity.

  • High Availability: Mitigate the impact of single-point failures. If one Evento Server instance becomes unavailable, others can continue processing messages, minimizing downtime.

  • Improved Performance: Leverage the combined processing power of multiple servers to enhance overall cluster performance.

Setting Up a Cluster:

  1. Deploy Multiple Evento Server Instances: Use Docker Compose or another container management tool to deploy multiple Evento Server instances. Configure each instance with unique ports to avoid conflicts.

  2. Shared PostgreSQL Configuration: All Evento Server instances within the cluster need to connect to the same PostgreSQL database. Ensure the connection details (URL, username, password) are consistent across all server configurations.

  3. Evento Bundle Configuration: When creating your Evento bundles, specify the addresses of all Evento Server instances within the cluster. This allows bundles to communicate with any available server for optimal load balancing and fault tolerance.

Important Note: Security considerations are crucial in a clustered environment. Implement appropriate access control mechanisms for the shared PostgreSQL database to ensure data integrity and prevent unauthorized access.

Conclusion:

Clustering Evento Server empowers you to build robust and scalable distributed systems. By leveraging multiple servers and a shared database, you can achieve high availability, handle increased load, and ensure smooth operation of your application ecosystem. Remember to prioritize security measures when deploying a clustered environment.