Compare commits

...

4 Commits

Author SHA1 Message Date
teslim a25bc385dd Task Init 2025-02-11 15:08:50 +01:00
teslim ea96dd98e2 Task Init 2025-02-11 15:08:35 +01:00
teslim 3b011affbb Task Init 2025-02-11 15:08:15 +01:00
teslim f52cec4cf1 Task Init 2025-02-11 15:06:41 +01:00
4 changed files with 8 additions and 5 deletions
+3
View File
@@ -0,0 +1,3 @@
/node_modules
/dist
/package-lock.json
+2 -2
View File
@@ -60,13 +60,13 @@ Your task is to extract the high-throughput ticket purchasing component (inspire
Simulate high load using a tool like [autocannon](https://github.com/mcollina/autocannon) or [wrk](https://github.com/wg/wrk). For example, to simulate 2000 concurrent connections on event 1: Simulate high load using a tool like [autocannon](https://github.com/mcollina/autocannon) or [wrk](https://github.com/wg/wrk). For example, to simulate 2000 concurrent connections on event 1:
npx autocannon -c 2000 -d 30 http://localhost:3000/buy/1 npx autocannon -c 2000 -d 30 http://localhost:3049/buy/1
### Metrics ### Metrics
Access real-time service metrics at: Access real-time service metrics at:
http://localhost:3000/metrics http://localhost:3049/metrics
These metrics should include data on tickets sold, remaining tickets per event, and any instances where the fallback mechanism was activated. These metrics should include data on tickets sold, remaining tickets per event, and any instances where the fallback mechanism was activated.
+2 -2
View File
@@ -11,7 +11,7 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"express": "^4.18.2", "express": "^4.21.2",
"redis": "^4.6.5" "redis": "^4.7.0"
} }
} }
+1 -1
View File
@@ -2,7 +2,7 @@ const express = require("express");
const redis = require("redis"); const redis = require("redis");
const app = express(); const app = express();
const port = process.env.PORT || 3000; const port = process.env.PORT || 3049;
app.use(express.json()); app.use(express.json());