A performance testing platform that compares Spring Boot vs Node.js backends with real-time analytics andmetrics visualization.
This project is a performance testing dashboard featuring for enterprise dual backend implementations repos with identical API contracts, enabling precise technology comparison real-time performance analytics through real-world messenger application testing.
I found a gap in the backend when comparing real data with the many articles discussing non-real data. I needed answers about how far one technology is ahead of another in certain tests, and whether this difference is worth the disadvantages that come with that technology. Thatโs why I decided to start this project.
Spring Boot vs Node.js Messenger Benchmark/
โโโ ๐จ frontend/ # Performance Testing Dashboard (Port 3000)
โโโ โ๏ธ middleware/go/ # Go Performance Engine (Port 8090)
โโโ โ backend/springboot/ # Spring Boot Backend (Port 8080 + 5001)
โโโ โฌข backend/nodejs/ # Node.js Backend (Port 5000)
โโโ ๐จ build/ # Build scripts
- Java 17+ (Spring Boot)
- Node.js 18+ (Node.js backend & frontend)
- Go 1.21+ (Middleware)
- MySQL 8.0+ (Database)
older versions not tested 100%
git clone https://github.com/dolamasa1/Spring-Boot-vs-Node.js-messenger.git
cd Spring-Boot-vs-Node.js-messenger
# Initialize submodules
git submodule update --init --recursiveCREATE DATABASE messenger_db;
CREATE USER 'messenger_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON messenger_db.* TO 'messenger_user'@'localhost';Spring Boot (Port 8080):
cd backend/springboot
mvn clean install
mvn spring-boot:runNode.js (Port 5000):
cd backend/nodejs
npm install
npm startcd middleware/go
go run *.go
## or
go run .cd frontend
python -m http.server 3000
# or: npx http-server -p 3000
# or: php -S localhost:3000the port matters because of the cors security configuration in the backends
based on http://localhost:3000 in your browser.
| Component | Technology | Purpose |
|---|---|---|
| Frontend | (Native HTML) Vanilla JS + CSS3 | Performance dashboard with real-time animations |
| Middleware | Go 1.21+ | High-performance testing engine and holder |
| Backend A | Spring Boot 3.2 + Java 17 | Enterprise Java implementation |
| Backend B | Node.js 18 + Express 4.x | JavaScript runtime implementation |
| Database | MySQL 8.0 | Data persistence for both backends |
| NOTE: we didn't fully tryed older versions |
- Dual Backend Testing: Distinct technologies but identical API contracts
- Real-time Metrics: Real-time performance monitoring accompanied by animated graphics
- Advanced Timing: Distinguish language processing overhead from HTTP time
- Statistical Analysis: throughput, success rates, and P95/P99 percentiles ๐จ Improved Dashboard
- Animated Metrics: fluid counter animations with real-time updates
- Progress Tracking: Real-time progress indicators with completion data
- Console Output: Timestamps and color-coded logging
- POST Tests: Message creation and user registration
- GET Tests: User lists and message history
- Mixed Loads: Real-world request patterns
- Stress Testing: High-concurrency performance limits
needed to be increased more and more
- Real-time Chat: WebSocket messaging with user presence
- Group Management: Multi-user chat rooms
- File Sharing: Images, voice messages, documents
- JWT Authentication: Secure user management
POST /api/auth/login- JWT authenticationPOST /api/auth/register- User registrationGET /api/user/- User search and listsPOST /api/message/send- Send messagesPOST /api/group/create- Group managementGET /api/health- System monitoring
- Spring Boot: Dual WebSocket (Spring + Socket.IO on port 5001)
- Node.js: Socket.IO real-time messaging
- User Presence: Online/offline status tracking
- โ Strengths: Better CPU performance, strong typing, enterprise features
- โ Weaknesses: Higher memory usage, slower startup
- ๐ฏ Best For: CPU-intensive operations, large teams
- โ Strengths: Faster startup, better I/O, rapid development
- โ Weaknesses: Single-threaded limitations, callback complexity
- ๐ฏ Best For: I/O-intensive apps, real-time features
- Exclusive Engine: Replaced JavaScript middleware for superior performance
- High Concurrency: Goroutine-based request handling
- Accurate Metrics: Millisecond-precision timing with real values
spring.datasource.url=jdbc:mysql://localhost:3306/messenger_db
app.jwt.secret=your-jwt-secret
app.websocket.type=bothDB_HOST=localhost
DB_NAME=messenger_db
JWT_SECRET_KEY=your-jwt-secret
PORT=5000- Port: 8090 (fixed)
- CORS: Enabled for frontend integration
- Concurrency: Configurable worker pools
- Configure Settings: Set backend endpoints and authentication
- Authenticate: Connect to both backends using JWT tokens
- Select Scenario: Choose test type and parameters
- Execute Tests: Run via Go middleware with real-time monitoring
- Analyze Results: Compare metrics with animated visualizations
Typical Performance Patterns: Spring Boot: Better type safety and consistent performance under CPU load; Node.js: Better I/O management and quicker response times for multiple requests at once- Go Middleware: 3-5 times more throughput than the outdated JavaScript version
Metric Comparisons: Response Times: Actual millisecond measurements, not zeros; Throughput: Requests per second based on the actual test duration; Success Rates: Accuracy based on HTTP status codes; Resource Usage: Analysis of memory and CPU efficiency
Fast Verification ```bash # Verify every service curl http://localhost:8080/api/health # http://localhost:5000/api/health # Spring Boot curl Node.js curl http://localhost:8090/api/health # Go Middleware
- CORS Errors: Serve frontend via HTTP server, not file protocol
- Database Connection: Verify MySQL is running and credentials match
- Authentication: Check JWT tokens and backend connectivity
- Port Conflicts: Ensure ports 8080, 5000, 8090, 3000 are available
[Frontend Dashboard] with a Real-time testing interface (./frontend/README.md)- [Backend Comparison] (./backend/README.md): Nodejs vs Spring Boot
- [Go Middleware] (./middleware/go/README.md) High-performance testing performance and HTTP holder - [Configuration] (./config/README.md): One shared recourse endpoints and settings
- RealTime Communication testing with a send recieve live stream - [ ] only a map for future microservices architecture - [ ] Examples of deployments
- sophisticated caching techniques (Redis)
My vision is an open source Documentaion about the actual data backend benchmarks so I welcome everyone to contribute and show better and better backend performance for a pure testing to the nural for each backend tech stack For more information, please refer to our Contributing Guide.
MIT License - For complete information, see the LICENSE file.
Ahmed Adel Moghraby ๐ง [[email protected]] (email: [email protected])
๐ [GitHub: dolamasa1] (https://github.com/dolamasa1)
Designed for accurate performance analysis * Comparable features, distinct technologies, and when and what to use..*

