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
Navigate to Infrastructure Directory
The Docker Compose configuration is located in the
infra directory:Start the Services
Launch all microservices and dependencies using Docker Compose: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.Verify Services are Running
Check that all containers are healthy:You should see output similar to this:
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: admin123PostgreSQL
Port: 5432Database:
shop_dbRedis
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:Simulate Normal Traffic
Make a legitimate purchase request:Simulate DDoS Attack
Now, let’s simulate a DDoS attack by sending more than 50 requests within 10 seconds from the same IP:Verify IP Blacklist
Check that the IP was added to the Redis blacklist:Environment Configuration
Argos Mesh uses the following environment variables for configuration:Database Configuration
| Variable | Value | Description |
|---|---|---|
SPRING_DATASOURCE_URL | jdbc:postgresql://db:5432/shop_db | PostgreSQL connection URL |
SPRING_DATASOURCE_USERNAME | user_shop | Database username |
SPRING_DATASOURCE_PASSWORD | secretPassword | Database password (change in production) |
RabbitMQ Configuration
| Variable | Value | Description |
|---|---|---|
SPRING_RABBITMQ_HOST | message_broker | RabbitMQ hostname |
SPRING_RABBITMQ_PORT | 5672 | AMQP port |
SPRING_RABBITMQ_USERNAME | admin | RabbitMQ username |
SPRING_RABBITMQ_PASSWORD | admin123 | RabbitMQ password (change in production) |
Redis Configuration
| Variable | Value | Description |
|---|---|---|
SPRING_DATA_REDIS_HOST | redis_db | Redis hostname |
SPRING_DATA_REDIS_PORT | 6379 | Redis port |
Sentinel Configuration
| Variable | Value | Description |
|---|---|---|
SPRING_THREADS_VIRTUAL_ENABLED | true | Enable Java 21 Virtual Threads |
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:Troubleshooting
Services Won’t Start
If services fail to start, check the logs:- 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-cacheto rebuild from scratch
Database Connection Errors
If the shop app can’t connect to the database, ensure the health check passed:Up (healthy). If not, check PostgreSQL logs:
RabbitMQ Connection Issues
Verify RabbitMQ is accessible:Reset the Environment
To completely reset the environment and start fresh:-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