20 Commits

Author SHA1 Message Date
Marek Siarkowicz
bf12179a5a server: Add --listen-client-http-urls flag to allow running grpc server separate from http server
Difference in load configuration for watch delay tests show how huge the
impact is. Even with random write scheduler grpc under http
server can only handle 500 KB with 2 seconds delay. On the other hand,
separate grpc server easily hits 10, 100 or even 1000 MB within 100 miliseconds.

Priority write scheduler that was used in most previous releases
is far worse than random one.

Tests configured to only 5 MB to avoid flakes and taking too long to fill
etcd.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 09:49:45 +02:00
Marek Siarkowicz
419a56e51a server: Pick one address that all grpc gateways connect to
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 09:49:45 +02:00
Marek Siarkowicz
85c48c4a60 server: Separate client listener grouping from serving
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 09:48:46 +02:00
Wei Fu
a9988e2625 server/embed: fix data race when start insecure grpc
There are two goroutines accessing the `gs` grpc server var. Before
insecure `gs` server start, the `gs` can be changed to secure server and
then the client will fail to connect to etcd with insecure request. It
is data-race. We should use argument for reference in the new goroutine.

fix: #15495

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-18 21:48:58 +08:00
anon
4dad1ed71e FIX #13389
Dummy fix. Implement wsproxy.Logger with zap.Logger. Use sctx.lg as logger.

Signed-off-by: anon <thisisnot@myemail.com>
2023-03-10 19:58:09 +02:00
Marek Siarkowicz
f3533f2593 server: Switch back to random scheduler to improve resilience to watch starvation
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-10 12:42:34 +01:00
jianfei.zhang
c26d7f5389 fix: code cleanup
Signed-off-by: jianfei.zhang <jianfei.zhang@daocloud.io>
2022-07-26 22:07:22 +08:00
Benjamin Wang
053ba95ed5 set max concurrent streams to the http2 server
The default max stream is 250 in http2. When there are more then
250 streams, the client side may be blocked until some previous
streams are released. So we need to support configuring a larger
`MaxConcurrentStreams`.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-06 03:43:46 +08:00
杨金珏
6220174687 support custom grpc.MaxConcurrentStreams
There is no update on the original PR (see below) for more then 2
weeks. So Benjamin(@ahrtr) continues to work on the PR. The first
step is to rebase the PR, because there are lots of conflicts with
the main branch.

The change to go.mod and go.sum reverted, because they are not needed.
The e2e test cases are also reverted, because they are not correct.

```
https://github.com/etcd-io/etcd/pull/14081
```

Signed-off-by: nic-chen <chenjunxu6@gmail.com>
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-06 03:43:46 +08:00
Piotr Tabor
cbf54a0421 Use proper grpc schema (unix:file) for unix sockets.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-17 08:57:23 +02:00
Piotr Tabor
1c401581e3 Close channel of started servers even if embed server fails to start.
Before this change:

```
gwmux, err = sctx.registerGateway([]grpc.DialOption{grpc.WithInsecure()})
if err != nil { return err; }
```

caused the Etcd.Serve() method finish without sctx.serversC channel being closed.
The code closing Etcd got stuck waiting for all the servers to be running.

Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-15 13:50:17 +02:00
Piotr Tabor
fcc8fce4d2 Expand logging in case of embed server not being able to successfully start.
So far the errors were directed to Etcd.Errc (channel) that is not being consumed in practice.

Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-15 13:50:17 +02:00
ahrtr
1713dc67b5 etcd server shouldn't wait for the ready notification infinitely on startup 2022-01-27 16:19:20 +08:00
Eng Zer Jun
2a151c8982
*: move from io/ioutil to io and os packages
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-10-28 00:05:28 +08:00
Marek Siarkowicz
90932324b1 client: Add grpc authority header integration tests 2021-09-29 12:42:16 +02:00
spacewander
576861e617 embed: unlimit the recv msg size of grpc-gateway
Ensure the client which access etcd via grpc-gateway won't
be limited by the MaxCallRecvMsgSize. Here we choose the same
default value of etcdcli as grpc-gateway's MaxCallRecvMsgSize.

Fix https://github.com/etcd-io/etcd/issues/12576
2021-06-03 16:36:19 +08:00
varvara dvortsova
c3303d94a4 embed: Added a check for an nil value of the request in ServeHTTP method. Fixed #12821 2021-05-09 20:45:43 +03:00
Piotr Tabor
3bb7acc8cf Migrate dependencies pkg/foo -> client/pkg/foo 2021-04-07 00:38:47 +02:00
Piotr Tabor
aaf423e962 server: Update imports.
find -name '*.go' | xargs sed -i --follow-symlinks 's|etcd/v3/|etcd/server/v3/|g'
2020-10-26 13:02:32 +01:00
Piotr Tabor
4a5e9d1261 server: Move server files to 'server' directory.
26  git mv mvcc wal auth etcdserver etcdmain proxy embed/ lease/ server
   36  git mv go.mod go.sum server
2020-10-26 12:57:19 +01:00