Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cloud_Computing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Tim Hobelsberger
Cloud_Computing
Commits
c508431e
Commit
c508431e
authored
Dec 14, 2022
by
Alexander Tim Hobelsberger
Browse files
Options
Downloads
Patches
Plain Diff
RoundRobin Algorithm
parent
3c933d31
Branches
Branches containing commit
No related tags found
1 merge request
!10
Skalierbarkeit
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
docker-compose.yaml
+10
-0
10 additions, 0 deletions
docker-compose.yaml
index.js
+1
-1
1 addition, 1 deletion
index.js
nginx/nginx.conf
+1
-1
1 addition, 1 deletion
nginx/nginx.conf
with
12 additions
and
2 deletions
docker-compose.yaml
+
10
−
0
View file @
c508431e
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
index.js
+
1
−
1
View file @
c508431e
...
@@ -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
);
});
});
...
...
This diff is collapsed.
Click to expand it.
nginx/nginx.conf
+
1
−
1
View file @
c508431e
...
@@ -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=/;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment