Skip to content

Commit 8a68fde

Browse files
committed
HTTP/1 transport
Signed-off-by: Lazar Cvetković <l.cvetkovic.997@gmail.com>
1 parent e21bbd7 commit 8a68fde

4 files changed

Lines changed: 21 additions & 23 deletions

File tree

internal/data_plane/proxy/reverse_proxy/proxy_factory.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
package reverse_proxy
22

33
import (
4-
"context"
5-
"crypto/tls"
64
"github.com/sirupsen/logrus"
7-
"golang.org/x/net/http2"
85
"net"
96
"net/http"
107
"net/http/httputil"
@@ -16,12 +13,13 @@ var EmptyReverseProxyDirector = func(request *http.Request) {}
1613
func CreateReverseProxy() *httputil.ReverseProxy {
1714
return &httputil.ReverseProxy{
1815
Director: EmptyReverseProxyDirector,
19-
Transport: &http2.Transport{
20-
DialTLSContext: func(ctx context.Context, network, addr string, cfg *tls.Config) (net.Conn, error) {
21-
return net.Dial(network, addr)
22-
},
23-
AllowHTTP: true,
24-
IdleConnTimeout: 2 * time.Second,
16+
Transport: &http.Transport{
17+
DialContext: (&net.Dialer{
18+
Timeout: 5 * time.Second,
19+
}).DialContext,
20+
IdleConnTimeout: 5 * time.Second,
21+
MaxIdleConns: 100,
22+
MaxIdleConnsPerHost: 10,
2523
},
2624
BufferPool: NewBufferPool(),
2725
FlushInterval: 0,

internal/worker_node/managers/readiness_probes.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package managers
22

33
import (
4-
"context"
5-
"crypto/tls"
64
"fmt"
75
"io"
86
"net"
@@ -11,7 +9,6 @@ import (
119
"time"
1210

1311
"github.com/sirupsen/logrus"
14-
"golang.org/x/net/http2"
1512
)
1613

1714
const ProbeURLFormat = "localhost:%d"
@@ -28,12 +25,13 @@ func createProbingDialer(network, addr string) (net.Conn, error) {
2825

2926
var httpProbingClient = http.Client{
3027
Timeout: 25 * time.Millisecond,
31-
Transport: &http2.Transport{
32-
DialTLSContext: func(ctx context.Context, network, addr string, cfg *tls.Config) (net.Conn, error) {
33-
return net.Dial(network, addr)
34-
},
35-
AllowHTTP: true,
36-
IdleConnTimeout: 1 * time.Second,
28+
Transport: &http.Transport{
29+
DialContext: (&net.Dialer{
30+
Timeout: 5 * time.Second,
31+
}).DialContext,
32+
IdleConnTimeout: 5 * time.Second,
33+
MaxIdleConns: 100,
34+
MaxIdleConnsPerHost: 10,
3735
},
3836
}
3937

scripts/common.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ function SetupWorkerNodes() {
8181
RemoteExec $1 "cd ~/cluster_manager; git pull; git lfs pull"
8282

8383
COMPILER_TAGS=""
84-
if sudo lshw -C display | grep -q NVIDIA
85-
then
86-
COMPILER_TAGS="-tags nvidia_gpu"
87-
fi
84+
#if sudo lshw -C display | grep -q NVIDIA
85+
#then
86+
# COMPILER_TAGS="-tags nvidia_gpu"
87+
#fi
8888

8989
# Compile worker node daemon
9090
RemoteExec $1 "sudo mkdir -p /cluster_manager/cmd/worker_node"

scripts/setup_node.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ then
9393
elif [ "$RUNTIME" = "dandelion" ]
9494
then
9595
# Install Cargo for Dandelion setup
96-
sudo apt install cargo -y
96+
wget https://static.rust-lang.org/rustup.sh
97+
chmod +x rustup.sh
98+
./rustup.sh -y
9799
fi
98100

99101
# Install GPU drivers

0 commit comments

Comments
 (0)