summaryrefslogtreecommitdiffstats
path: root/src/web/server/static
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 17:33:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 17:34:10 +0000
commit83ba6762cc43d9db581b979bb5e3445669e46cc2 (patch)
tree2e69833b43f791ed253a7a20318b767ebe56cdb8 /src/web/server/static
parentReleasing debian version 1.47.5-1. (diff)
downloadnetdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.tar.xz
netdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.zip
Merging upstream version 2.0.3+dfsg (Closes: #923993, #1042533, #1045145).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/web/server/static')
-rw-r--r--src/web/server/static/README.md10
-rw-r--r--src/web/server/static/static-threaded.c9
2 files changed, 0 insertions, 19 deletions
diff --git a/src/web/server/static/README.md b/src/web/server/static/README.md
index e67949e21..d480ae001 100644
--- a/src/web/server/static/README.md
+++ b/src/web/server/static/README.md
@@ -1,13 +1,3 @@
-<!--
-title: "`static-threaded` web server"
-description: "The Netdata Agent's static-threaded web server spawns a fixed number of threads that listen to web requests and uses non-blocking I/O."
-custom_edit_url: https://github.com/netdata/netdata/edit/master/src/web/server/static/README.md
-sidebar_label: "`static-threaded` web server"
-learn_status: "Published"
-learn_topic_type: "Tasks"
-learn_rel_path: "Developers/Web"
--->
-
# `static-threaded` web server
The `static-threaded` web server spawns a fixed number of threads.
diff --git a/src/web/server/static/static-threaded.c b/src/web/server/static/static-threaded.c
index a4b24c9ac..01c9817fb 100644
--- a/src/web/server/static/static-threaded.c
+++ b/src/web/server/static/static-threaded.c
@@ -211,7 +211,6 @@ static void *web_server_add_callback(POLLINFO *pi, short int *events, void *data
web_client_set_conn_tcp(w);
}
-#ifdef ENABLE_HTTPS
if ((web_client_check_conn_tcp(w)) && (netdata_ssl_web_server_ctx)) {
sock_delnonblock(w->ifd);
@@ -239,13 +238,10 @@ static void *web_server_add_callback(POLLINFO *pi, short int *events, void *data
sock_setnonblock(w->ifd);
}
-#endif
netdata_log_debug(D_WEB_CLIENT, "%llu: ADDED CLIENT FD %d", w->id, pi->fd);
-#ifdef ENABLE_HTTPS
cleanup:
-#endif
worker_is_idle();
return w;
}
@@ -503,14 +499,12 @@ void *socket_listen_main_static_threaded(void *ptr) {
if(!api_sockets.opened)
fatal("LISTENER: no listen sockets available.");
-#ifdef ENABLE_HTTPS
netdata_ssl_validate_certificate = !config_get_boolean(CONFIG_SECTION_WEB, "ssl skip certificate verification", !netdata_ssl_validate_certificate);
if(!netdata_ssl_validate_certificate_sender)
netdata_log_info("SSL: web server will skip SSL certificates verification.");
netdata_ssl_initialize_ctx(NETDATA_SSL_WEB_SERVER_CTX);
-#endif
// 6 threads is the optimal value
// since 6 are the parallel connections browsers will do
@@ -526,13 +520,11 @@ void *socket_listen_main_static_threaded(void *ptr) {
if (static_threaded_workers_count < 1) static_threaded_workers_count = 1;
-#ifdef ENABLE_HTTPS
// See https://github.com/netdata/netdata/issues/11081#issuecomment-831998240 for more details
if (OPENSSL_VERSION_NUMBER < OPENSSL_VERSION_110) {
static_threaded_workers_count = 1;
netdata_log_info("You are running an OpenSSL older than 1.1.0, web server will not enable multithreading.");
}
-#endif
size_t max_sockets = (size_t)config_get_number(CONFIG_SECTION_WEB, "web server max sockets",
(long long int)(rlimit_nofile.rlim_cur / 4));
@@ -548,7 +540,6 @@ void *socket_listen_main_static_threaded(void *ptr) {
char tag[50 + 1];
snprintfz(tag, sizeof(tag) - 1, "WEB[%d]", i+1);
- netdata_log_info("starting worker %d", i+1);
static_workers_private_data[i].thread = nd_thread_create(tag, NETDATA_THREAD_OPTION_DEFAULT,
socket_listen_main_static_threaded_worker,
(void *)&static_workers_private_data[i]);