Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

also allow main echo/http port to be disabled; so a server can be sta… #559

Merged
merged 3 commits into from May 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -74,8 +74,10 @@ fortio.exe server

Once `fortio server` is running, you can visit its web UI at [http://localhost:8080/fortio/](http://localhost:8080/fortio/)

You can get a preview of the reporting/graphing UI at [https://fortio.istio.io/](https://fortio.istio.io/)
You can get a preview of the reporting/graphing UI at [https://demo.fortio.org/](https://demo.fortio.org/).
<!--
and on [istio.io/docs/performance-and-scalability/synthetic-benchmarks/](https://istio.io/docs/performance-and-scalability/synthetic-benchmarks/)
-->

## Command line arguments

Expand Down
10 changes: 5 additions & 5 deletions Webtest.sh
Expand Up @@ -105,12 +105,12 @@ docker exec $DOCKERNAME $FORTIO_BIN_PATH load -H Foo:Bar -H Blah:Blah -qps 1 -t
# Do a grpcping
docker exec $DOCKERNAME $FORTIO_BIN_PATH grpcping localhost
# Do a grpcping to a scheme-prefixed destination. Fortio should append port number
# re-enable once we get https://demo.fortio.org/
# docker exec $DOCKERNAME $FORTIO_BIN_PATH grpcping https://fortio.istio.io
# docker exec $DOCKERNAME $FORTIO_BIN_PATH grpcping http://fortio.istio.io
# re-enable once we get https://grpc.fortio.org:/ fully working with https too
# docker exec $DOCKERNAME $FORTIO_BIN_PATH grpcping https://grpc.fortio.org
docker exec $DOCKERNAME $FORTIO_BIN_PATH grpcping grpc.fortio.org:8079
# Do a grpcping with -cert flag. Fortio should use valid cert.
# docker exec $DOCKERNAME $FORTIO_BIN_PATH grpcping -cacert $CERT fortio.istio.io:443
# docker exec $DOCKERNAME $FORTIO_BIN_PATH grpcping -cacert $CERT https://fortio.istio.io
# docker exec $DOCKERNAME $FORTIO_BIN_PATH grpcping -cacert $CERT grpc.fortio.org:443
# docker exec $DOCKERNAME $FORTIO_BIN_PATH grpcping -cacert $CERT https://grpc.fortio.org
# Do a local grpcping. Fortio should append default grpc port number to destination
docker exec $DOCKERNAME $FORTIO_BIN_PATH grpcping localhost
# pprof should be there, no 404/error
Expand Down
10 changes: 6 additions & 4 deletions fortio_main.go
Expand Up @@ -110,7 +110,7 @@ var (
profileFlag = flag.String("profile", "", "write .cpu and .mem profiles to `file`")
grpcFlag = flag.Bool("grpc", false, "Use GRPC (health check by default, add -ping for ping) for load testing")
echoPortFlag = flag.String("http-port", "8080",
"http echo server port. Can be in the form of host:port, ip:port, `port` or /unix/domain/path.")
"http echo server port. Can be in the form of host:port, ip:port, `port` or /unix/domain/path or \""+disabled+"\".")
tcpPortFlag = flag.String("tcp-port", "8078",
"tcp echo server port. Can be in the form of host:port, ip:port, `port` or /unix/domain/path or \""+disabled+"\".")
udpPortFlag = flag.String("udp-port", "8078",
Expand Down Expand Up @@ -185,7 +185,7 @@ var (
calcQPS = flag.Bool("calc-qps", false, "Calculate the qps based on number of requests (-n) and duration (-t)")
)

// nolint: funlen // well yes it's fairly big and lotsa ifs.
// nolint: funlen,gocyclo // well yes it's fairly big and lotsa ifs.
func main() {
flag.Var(&proxiesFlags, "P",
"Tcp proxies to run, e.g -P \"localport1 dest_host1:dest_port1\" -P \"[::1]:0 www.google.com:443\" ...")
Expand Down Expand Up @@ -271,8 +271,10 @@ func main() {
if *redirectFlag != disabled {
fhttp.RedirectToHTTPS(*redirectFlag)
}
if !ui.Serve(baseURL, *echoPortFlag, *echoDbgPathFlag, *uiPathFlag, *dataDirFlag, percList) {
os.Exit(1) // error already logged
if *echoPortFlag != disabled {
if !ui.Serve(baseURL, *echoPortFlag, *echoDbgPathFlag, *uiPathFlag, *dataDirFlag, percList) {
os.Exit(1) // error already logged
}
}
startProxies()
case "grpcping":
Expand Down