Skip to content
Snippets Groups Projects
Commit c508431e authored by Alexander Tim Hobelsberger's avatar Alexander Tim Hobelsberger
Browse files

RoundRobin Algorithm

parent 3c933d31
Branches
No related tags found
1 merge request!10Skalierbarkeit
...@@ -82,6 +82,8 @@ services: ...@@ -82,6 +82,8 @@ services:
- 9100 - 9100
deploy: deploy:
mode: global mode: global
logging:
driver: none
# Image of mongoDB-exporter # Image of mongoDB-exporter
# mongoDB-exporter will monitor the mongoDB Database and provide an Endpoint, which Prometheus can scrape data from. # mongoDB-exporter will monitor the mongoDB Database and provide an Endpoint, which Prometheus can scrape data from.
...@@ -95,6 +97,8 @@ services: ...@@ -95,6 +97,8 @@ services:
#restart: unless-stopped #restart: unless-stopped
command: command:
- '--mongodb.uri=mongodb://mongodb:27017/cloudComputing/' - '--mongodb.uri=mongodb://mongodb:27017/cloudComputing/'
logging:
driver: none
# Image of Prometheus # Image of Prometheus
# Prometheus scarpes metric data from html Endpoints # Prometheus scarpes metric data from html Endpoints
...@@ -112,6 +116,8 @@ services: ...@@ -112,6 +116,8 @@ services:
restart: unless-stopped restart: unless-stopped
command: command:
- "--config.file=/etc/prometheus/prometheus.yml" - "--config.file=/etc/prometheus/prometheus.yml"
logging:
driver: none
# Image of Grafana # Image of Grafana
# Grafana takes the metric data from Prometheus and visualizes data in web UI # Grafana takes the metric data from Prometheus and visualizes data in web UI
...@@ -125,6 +131,8 @@ services: ...@@ -125,6 +131,8 @@ services:
volumes: volumes:
- grafana-data:/var/lib/grafana - grafana-data:/var/lib/grafana
restart: unless-stopped restart: unless-stopped
logging:
driver: none
mongodb: mongodb:
image: mongo image: mongo
...@@ -132,6 +140,8 @@ services: ...@@ -132,6 +140,8 @@ services:
- 27017:27017 - 27017:27017
volumes: volumes:
- mongodb:/data/db - mongodb:/data/db
logging:
driver: none
# node: # node:
# restart: always # restart: always
......
...@@ -156,6 +156,7 @@ app.use('/authenticate', authenticationRoute) ...@@ -156,6 +156,7 @@ app.use('/authenticate', authenticationRoute)
//Views //Views
app.get('/', (req, res) => { app.get('/', (req, res) => {
console.log("Verbunden mit: " + process.env.NAME);
res.sendFile(__dirname + '/views/start.html'); res.sendFile(__dirname + '/views/start.html');
}); });
...@@ -190,7 +191,6 @@ app.get('/login', (req, res) => { ...@@ -190,7 +191,6 @@ app.get('/login', (req, res) => {
io.on('connection', (socket) => { io.on('connection', (socket) => {
socket.on('userLogin', async function(response) { socket.on('userLogin', async function(response) {
console.log("userLogin event on: " + port);
await addUserToActiveUsers(response, socket); await addUserToActiveUsers(response, socket);
clientActiveUsers.set(activeUsers.size); clientActiveUsers.set(activeUsers.size);
}); });
......
...@@ -28,7 +28,7 @@ http { ...@@ -28,7 +28,7 @@ http {
#hash $remote_addr consistent; #hash $remote_addr consistent;
# least_conn; # least_conn;
# or "ip_hash" (uses the first three octets of the client IPv4 address, or the entire IPv6 address) # or "ip_hash" (uses the first three octets of the client IPv4 address, or the entire IPv6 address)
ip_hash; # ip_hash;
# or "sticky" (needs commercial subscription) # or "sticky" (needs commercial subscription)
# sticky cookie srv_id expires=1h domain=.example.com path=/; # sticky cookie srv_id expires=1h domain=.example.com path=/;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment