Leading Mexican QSR Enterprise Artwork

Leading Mexican QSR Enterprise

Quick Service Restaurant

How to make your Restaurant Information System scalable & flexible with Serverless

About Leading Mexican QSR Enterprise

A global fast-food giant that specializes in Mexican cuisine collaborated with Antstack to future-proof its technology and enhance customer service resilience. They recognized the potential to improve their architecture to ensure fault tolerance, optimize performance, and reduce development dependencies. Their existing serverless architecture of Restaurant Information System (RIS) middleware on AWS did not welcome the adoption of new features. So that meant we had to achieve scalability, reduce operational risks, and improve performance without altering their legacy codebase.

The Challenge

What problems did we solve with AWS serverless?

  1. Limited Scalability and Feature Adoption:

    • The RIS was restrictive and could not accommodate new features without significant changes to the legacy codebase.
    • Categories for downstream services were hard coded, requiring redundant manual updates for new features.
  2. Operational Risks: Single-region deployment made the system vulnerable to region-wide outages, risking significant data loss and downtime.

  3. Performance Issues: High bandwidth requirements led to expensive query API operations and occasional system crashes under heavy loads.

  4. Simplification Challenges:

    • Query APIs needed optimization to handle large payloads while reducing costs and maintaining system performance.

    • High bandwidth requirements led to expensive query API operations and occasional system crashes under heavy loads.

  5. Simplification Challenges:

    Query APIs needed optimization to handle large payloads while reducing costs and maintaining system performance.

Our Goals

Goals to ensure Restaurant Information System adopts features and is scalable

  1. Enable fault tolerance with multi-region deployment to ensure seamless operations during regional outages.
  2. Make the category system dynamic, eliminating the need for hardcoding and enabling faster feature adoption.
  3. Simplify the query API to regulate payloads, enhance performance, and reduce costs.

Our Impact

Dynamic Category S

1. Dynamic Category

Challenge: The existing system required hardcoded Lambda functions for every new category, increasing development time and complexity.

Solution: AntStack transformed the category system into a dynamic schema-based architecture:

  1. Dynamic Category Schema:

    • Categories such as Address, Status, BOH, etc were structured into a dynamic schema.
    • We developed a category service to allow admins to define category schemas using APIs, eliminating the need to add a new Lambda function for each category.
  2. Webhook Enhancement: Webhook endpoints were modified to accept dynamic category identifiers, reducing dependency on pre-defined hardcoded logic.

Impact of Dynamic Category System

Reduced engineering dependency for new category deployments. Enabled faster rollout of new features. Improved system flexibility and scalability.

Multi-Region Architecture

Challenge: Single-region deployment risked downtime and data loss during regional failures.

Solution: AntStack designed a multi-region setup across us-east-1 (primary) and us-west-2 (secondary):

  1. Routing and Failover with Amazon Route 53:

    • Failover Routing Policies: Automatically redirected traffic to the backup region in case of failures.
    • Custom Domain Setup: A single domain provided a seamless experience regardless of the active region.
  2. Global DynamoDB Tables:

    • Global Restaurant Master Table: Synchronized restaurant data across regions in real-time.
    • Global Categories Table: Ensured consistency in category schema data between primary and secondary regions.
  3. Event Duplication Prevention:

    • An Active Region Value was stored in DynamoDB records.
    • Lambda functions processed events only in the active region, preventing redundant updates across multiple regions.
  4. Health Monitoring:

    • Amazon CloudWatch tracked system metrics (API Gateway requests, DynamoDB read/write capacity, Lambda invocations).
    • Health checks were configured to trigger failover within 60–120 seconds, ensuring uninterrupted service.

Impact of Multi-region Architecture

Near-Zero downtime for fault tolerance Prevented data loss during regional outages Automated traffic redirection for seamless customer experience

QSR-Multi-Region-Architecture.png

Simplified Query API

Challenge: The query API struggled with handling large data payloads, resulting in crashes and high costs.

Solution: AntStack optimized the API by regulating query payloads:

  1. Optimized Query Handling:

    • API Gateway routes were reconfigured to limit payload size and improve response times.
    • Large datasets were broken into manageable chunks for efficient processing.
  2. Cost and Performance Optimization:

    • By simplifying the query structure, the API avoided expensive processing overheads.
    • AWS Lambda processed requests asynchronously, reducing latency and cost per invocation.

Impact of Simplified Query API

Improved system reliability during peak usage. Reduced API costs by optimizing query processing. Enhanced performance, ensuring smooth data retrieval for downstream systems.

Serverless Architecture Transformation

Challenge: Managing infrastructure for the middleware system added unnecessary overhead and cost.

Solution: AntStack transitioned their RIS middleware to a 100% serverless architecture:

  1. Event-Driven Processing with AWS EventBridge:

    • EventBridge acted as the central event bus, routing webhook-triggered events to appropriate services.
  2. DynamoDB as the Data Backbone:

    • DynamoDB tables (global and regional) provided low-latency, high-availability data storage.
  3. Lambda for Stateless Processing:

    • All backend logic, including event parsing and categorization, was offloaded to AWS Lambda.
    • Stateless architecture eliminated dependency on traditional servers.
  4. API Gateway for Frontend Integration:

    • API Gateway served as the unified entry point for all webhook and query operations.

Impact of Serverless Architecture Transformation

Eliminated infrastructure management overhead. Enabled auto-scaling to handle traffic spikes seamlessly. Reduced overall operational costs by adopting a pay-per-use model.

Streamlined Event Flow

Challenge: Complex and redundant event processing workflows led to inefficiencies.

Solution: AntStack re-engineered the event flow for simplicity and efficiency:

  1. End-to-End Workflow:

    • API GatewayAWS EventBridgeDynamoDBAWS Lambda.
    • Events were categorized, processed, and stored dynamically based on the new schema.
  2. Payload Regulation:

    • Payloads were validated and optimized at every stage, preventing unnecessary processing.
  3. Dynamic Event Routing:

    • EventBridge rules dynamically routed events based on category identifiers, reducing manual configuration.

Impact of Streamlined Event Flow

Minimized redundant event processing. Improved system throughput and responsiveness. Ensured scalability to handle surges in traffic.

Resources and Timeline

Team Size: 2 engineers from AntStack.

Timeline: Delivered within 2 to 2.5 months.

Final Results

  1. Fault Tolerance Achieved:

    • Regional outages no longer impacted service availability.
    • Traffic was seamlessly redirected between regions within 60–120 seconds.
  2. Dynamic Categories Implemented:

    • New categories were integrated without altering the codebase.
    • Engineering resources were freed up for higher-value tasks.
  3. Optimized Query API Performance:

    • Query API became more efficient, handling large datasets without crashing.
    • Cost savings were achieved by reducing operational overhead.
  4. Operational Scalability:

    • Serverless architecture ensured the system scaled effortlessly during demand spikes.
  5. Delivery Timeline:

    • The entire solution was implemented in 2 to 2.5 months by a team of 2 engineers.

Talk to Tech and Engineering

Leaders behind this:

Jeevan Dongre

Jeevan Dongre

Co-Founder & CEO, AntStack

Connect
Prashanth HN

Prashanth HN

Co-Founder & CTO, AntStack

Connect
Grid Image
Cookies Icon

These cookies are used to collect information about how you interact with this website and allow us to remember you. We use this information to improve and customize your browsing experience, as well as for analytics.

If you decline, your information won’t be tracked when you visit this website. A single cookie will be used in your browser to remember your preference.