December 19, 2024

Event-Driven Systems Meet AI: The Key to Mixmax’s Growth and Innovation

Event-Driven Systems Meet AI: The Key to Mixmax’s Growth and Innovation

TL;DR

  • Event-Driven Architecture reduces system coupling, enabling Mixmax to build new features without inheriting technical debt from legacy systems.
  • The new AWS EventBridge-based Event Bus simplifies our architecture, improves developer experience, and enhances solution efficiency.
  • LLMs (Large Language Models) boost engineering efficiency, especially when it comes to prototyping and new codebases, helping Mixmax to move forward with pace.

Breaking Free from Technical Debt with Event-Driven Architecture

Every software system accumulates technical debt over time—it’s inevitable. The key is managing it effectively and strategically. Mixmax, with its rich history of product evolution, has faced its share of challenges stemming from technical debt in certain areas of its architecture. While such debt can hinder engineering efficiency, adopting an event-driven microservices architecture has enabled us to mitigate its impact.

event-driven-1

Event-driven architecture empowers us to build decoupled components, allowing the product to evolve independently from legacy systems. This means that even as we work to address core technical debt, we can simultaneously develop new features and expand into entirely new product areas. The decoupled nature of event-driven design ensures that we’re not bogged down by the limitations of older systems, giving Mixmax the flexibility to innovate without compromise.

The In-house Event Delivery System

For years, our in-house event delivery system served as the backbone of Mixmax’s architecture. It handled an impressive ~800M published events per month, showcasing its robustness. However, by last year, it became clear that this system had reached its limits. To support Mixmax’s future growth and evolving needs, we decided it was time to modernize.

event-driven

The original design relied on events traversing multiple SQS queues before reaching their final destination. While functional, this approach came with several challenges:

  • Traffic Amplification: The system multiplied traffic volume with every additional consumer and in-between queue.
  • Complex Updates: Adding or modifying an event required code changes across multiple services.
  • Operational Overhead: Introducing new consumers demanded both infrastructure and code updates, making the system less agile.
  • Debugging Difficulties: Diagnosing issues was cumbersome and time-consuming.

While this system was essential to Mixmax’s growth in the past, it became clear that these limitations were creating bottlenecks. It was time to rethink the core of our architecture to ensure scalability, agility, and efficiency moving forward.

New Event Bus

In October 2023, we unveiled our new Event Bus solution, built on Amazon EventBridge. This upgrade addressed the limitations of our in-house event delivery system, marking a significant step toward a more scalable, efficient, and developer-friendly architecture.

event-driven-2

Here’s what the new Event Bus brings to the table:

  • Simplified Architecture: By eliminating message duplication, we’ve reduced failure points, making the system more robust.
  • Lower Maintenance Overhead: Monitoring and debugging are now easier, with less code to manage and fewer scaling headaches.
  • Cost Efficiency: EventBridge operates at an average cost of $1 + $0.55 per million published events—similar to SQS queue costs but without the additional compute expenses for ECS workers handling intermediate traffic.
  • Schema Enforcement: Events are validated against defined schemas at the time of publishing, ensuring no schema inconsistency can sneak in.
  • Direct Integrations: Features like asynchronous Lambda invocations simplify development and architecture.

The system is built around three core components:

  • Event Bus: Handles event routing and delivery.
    • EventBridge Rules: These rules define how events are routed to specific targets based on filters and patterns.
    • EventBridge Targets: The endpoints (such as Lambda functions or SQS queues) that receive and process the events.
  • Event Schema Catalog: A repository for event schemas, enabling runtime validation.
    • Engineers propose new schemas or changes via pull requests, ensuring collaboration and thorough review.
    • Approved schemas are deployed to Amazon EventBridge Schema Registry for consistent use across the system.
  • Event Publisher: A Lambda function for publishing events.
    • Events are validated against registered schemas. If validation fails, errors are returned, and the event lands in the Dead Letter Queue (DLQ).
    • Centralized monitoring ensures visibility into all published events and potential issues.

With this new Event Bus, Mixmax has taken a major step toward a future-proof architecture that not only supports our current needs but also scales seamlessly with our growth.

Smarter Engineering with LLMs at Mixmax

At Mixmax, efficiency is a core value, and Large Language Models (LLMs) have been game-changers in how we work. These tools have transformed the way our engineers prototype and build new codebases, enabling faster iteration and more confident development.

Every engineer at Mixmax has access to tools like Cursor or GitHub Copilot, with the company sponsoring the latest and most advanced LLMs available. We also leverage automated code reviews served by CodeRabbit. This seamless integration of AI assistance into our workflows allows engineers to focus on solving complex problems while handling repetitive tasks and boilerplate code more efficiently.

By combining event-driven architecture with AI-driven engineering, Mixmax has found a sweet spot for innovation: moving fast while strengthening the technical foundations of our systems. With LLMs, we’re not just building faster—we’re building smarter.

 

Interested in joining the team? Visit Mixmax Careers.

You deserve a spike in replies, meetings booked, and deals won.

Try Mixmax free