Skip to main content
Argos Mesh is a distributed system designed to prevent DDoS attacks on e-commerce applications using intelligent traffic analysis and IP blacklisting. This guide will walk you through setting up the complete system locally using Docker Compose.

Prerequisites

Before you begin, ensure you have the following installed on your system:

Docker

Version 20.10 or higher

Docker Compose

Version 2.0 or higher

Git

For cloning the repository

Java 21

Optional, for local development
Argos Mesh uses Java 21 with Virtual Threads in the Sentinel service for optimal performance when handling high-traffic scenarios.

Setup Steps

1

Clone the Repository

Clone the Argos Mesh repository to your local machine:
git clone https://github.com/yourusername/argos-mesh.git
cd argos-mesh
2

Navigate to Infrastructure Directory

The Docker Compose configuration is located in the infra directory:
cd infra
3

Start the Services

Launch all microservices and dependencies using Docker Compose:
docker-compose up -d
This command will build and start all services in detached mode. The initial build may take 5-10 minutes as Maven downloads dependencies and compiles the Java applications.
The -d flag runs containers in the background. Omit it if you want to see real-time logs.
4

Verify Services are Running

Check that all containers are healthy:
docker-compose ps
You should see output similar to this:
NAME                IMAGE                              STATUS
shop_db             postgres:15-alpine                 Up (healthy)
shop_app            infra-app                          Up
sentinel_app        infra-sentinel                     Up
notify_app          infra-notify                       Up
message_broker      rabbitmq:3-management-alpine       Up (healthy)
black_list          redis:7.2-alpine                   Up (healthy)
5

Access the Application

Once all services are running, you can access:

Orders API

URL: http://localhost:8080Main shop API for product management

RabbitMQ Management

URL: http://localhost:15672Username: admin / Password: admin123

PostgreSQL

Port: 5432Database: shop_db

Redis

Port: 6379IP blacklist storage

Test the System

Now that Argos Mesh is running, let’s test the DDoS prevention capabilities.

Create a Product

First, create a test product in the shop:
curl -X POST http://localhost:8080/orders/products \
  -H "Content-Type: application/json" \
  -d '{
    "productName": "Laptop",
    "productPrice": 999.99,
    "productStock": 100
  }'
Expected Response:
{
  "productID": 1,
  "productName": "Laptop",
  "productPrice": 999.99,
  "productStock": 100
}

Simulate Normal Traffic

Make a legitimate purchase request:
curl -X POST http://localhost:8080/orders/products/1/sell \
  -H "Content-Type: application/json" \
  -d '{
    "quantity": 1
  }'
Expected Response:
HTTP/1.1 202 Accepted
Check the sentinel logs to see normal traffic processing:
docker logs sentinel_app
Output:
[ Sentinel🛡️ ] Normal traffic of the IP: 172.18.0.1

Simulate DDoS Attack

Now, let’s simulate a DDoS attack by sending more than 50 requests within 10 seconds from the same IP:
for i in {1..60}; do
  curl -X POST http://localhost:8080/orders/products/1/sell \
    -H "Content-Type: application/json" \
    -d '{"quantity": 1}' &
done
wait
After 50 requests in 10 seconds, the Sentinel service will detect suspicious activity, ban the IP for 10 minutes, and trigger an alert notification.
Check the notify service logs to see the security alert:
docker logs notify_app
Output:
[ Alert ] - 2026-03-05T13:45:23.123
The IP: 172.18.0.1
Is suspicious of try an: Suspicious behavior
This is: CRITICAL

Verify IP Blacklist

Check that the IP was added to the Redis blacklist:
docker exec black_list redis-cli KEYS "blacklist:ip:*"
Output:
1) "blacklist:ip:172.18.0.1"

Environment Configuration

Argos Mesh uses the following environment variables for configuration:

Database Configuration

VariableValueDescription
SPRING_DATASOURCE_URLjdbc:postgresql://db:5432/shop_dbPostgreSQL connection URL
SPRING_DATASOURCE_USERNAMEuser_shopDatabase username
SPRING_DATASOURCE_PASSWORDsecretPasswordDatabase password (change in production)

RabbitMQ Configuration

VariableValueDescription
SPRING_RABBITMQ_HOSTmessage_brokerRabbitMQ hostname
SPRING_RABBITMQ_PORT5672AMQP port
SPRING_RABBITMQ_USERNAMEadminRabbitMQ username
SPRING_RABBITMQ_PASSWORDadmin123RabbitMQ password (change in production)

Redis Configuration

VariableValueDescription
SPRING_DATA_REDIS_HOSTredis_dbRedis hostname
SPRING_DATA_REDIS_PORT6379Redis port

Sentinel Configuration

VariableValueDescription
SPRING_THREADS_VIRTUAL_ENABLEDtrueEnable Java 21 Virtual Threads
Security Notice: The default passwords are for development only. Always use strong, unique passwords in production environments.

Port Mappings

The following ports are exposed to the host machine:
  • 8080 → Shop API (Orders service)
  • 5432 → PostgreSQL database
  • 5672 → RabbitMQ AMQP
  • 15672 → RabbitMQ Management UI
  • 6379 → Redis

Health Checks

All services implement health checks to ensure proper startup order:
healthcheck:
  test: ["CMD-SHELL", "pg_isready -U user_shop -d shop_db"]
  interval: 10s
  timeout: 5s
  retries: 5

Troubleshooting

Services Won’t Start

If services fail to start, check the logs:
docker-compose logs -f
Common issues:
  • Port conflicts: Ensure ports 5432, 5672, 6379, 8080, and 15672 are not in use
  • Memory: Ensure Docker has at least 4GB of RAM allocated
  • Build errors: Run docker-compose build --no-cache to rebuild from scratch

Database Connection Errors

If the shop app can’t connect to the database, ensure the health check passed:
docker-compose ps db
The status should show Up (healthy). If not, check PostgreSQL logs:
docker logs shop_db

RabbitMQ Connection Issues

Verify RabbitMQ is accessible:
curl -u admin:admin123 http://localhost:15672/api/overview

Reset the Environment

To completely reset the environment and start fresh:
docker-compose down -v
docker-compose up -d
The -v flag removes all volumes, including database data and Redis cache.

Next Steps

Architecture Overview

Learn how the microservices work together

API Reference

Explore the REST API endpoints

Configuration

Customize your deployment

Security

Learn about DDoS protection

Build docs developers (and LLMs) love