Calling services without a proxy

I am having trouble figuring out how to call a service without a proxy. I have gone through the documentation of provisioning hostnames & routes, but at the end of the document there is nothing about calling it by its hostname, only comments about setting up proxies and using CURL.

Wondering if there are any additional documents that I’ve missed because I am having trouble calling my custom hostname. I can proxy just fine, but not sure if there are any steps I may be unaware of.

1 Like

Calling the deployed server with a Postman gRPC request works fine.

Unless you’re amazingly good with the command line, using curl to invoke on a gRPC service will likely be very challenging. I suggest you use Postman or grpcui instead

@dvc Wondering if you are using a proxy to call from Postman - I get the screenshot below when I attempt to use server reflection on my hostname configured in Kalix from Postman

@improving The end goal is to call my hostname using GRPC methods native to the front-end application I am building. For now I am just trying to query the server locally, before diving into the code surrounding making GRPC calls from a client. See above comment regarding problems querying Postman by Kalix-configured hostname, and I am not aware of ways to use grpcui with a hostname that is not localhost.

The grpcui --help command will give you all the details. Here’s the relevant initial portion:

grpcui [flags] [address]
Starts a web server that hosts a web UI for sending RPCs to the given address.
The address will typically be in the form “host:port” where host can be an IP
address or a hostname and port is a numeric port or service name. If an IPv6
address is given, it must be surrounded by brackets, like “[2001:db8::1]”. For
Unix variants, if a -unix=true flag is present, then the address must be the
path to the domain socket.
Most flags control how the connection to the gRPC server is established. The
web server will always bind only to localhost, without TLS, so only the port
can be controlled via command-line flags.

If you’re trying to use the reflection API, you will most likely need this flag:

-use-reflection
When true, server reflection will be used to determine the RPC schema.
Defaults to true unless a -proto or -protoset option is provided. If
-use-reflection is used in combination with a -proto or -protoset flag,
the provided descriptor sources will be used in addition to server
reflection to resolve messages and extensions.

If you have brew you can install grpcui with brew install grpcui which is simpler than what the documentation recommends. :slight_smile:

Thanks for the details… odd that the GitHub does not reference brew command for installation anywhere :stuck_out_tongue:

However this only results in a context deadline exceeded error. I am using port 8080 - maybe I missed a configuration step around ports?

@AlStein92 and I discussed this offline but for everyone else’s edification, port 443 was needed for Kalix’s HTTPS support.

1 Like