gRPC#

Note

For routing, gRPC currently supports problems of up to about 5500 locations when a travel time matrix is included, or about 8000 locations when it is not. For a larger problem, use a local cuopt.routing.Solve() or the legacy HTTP server.

NVIDIA cuOpt can run LP, MIP, QP, and routing (VRP, TSP, PDP) solves on a remote GPU host through cuopt_grpc_server. There are two ways to reach that server:

Remote execution (zero code change)

Set CUOPT_REMOTE_HOST and CUOPT_REMOTE_PORT on the client machine. The Python solver APIs, the C API cuOptSolve, and cuopt_cli forward LP, MIP, and QP solves automatically. Modeling-language integrations that call one of those APIs, including AMPL, GAMS, PuLP, JuMP, Pyomo, and CVXPY, forward the same way. No client code changes are required. This does not work for routing at this time (tracked in #1633). See Quick Start and Third-Party Modeling Languages.

gRPC clients (explicit client)

Your program opens a gRPC connection and manages jobs itself. cuOpt ships two Python clients. Both are asynchronous job APIs: submit, then wait or poll.

In this section, remote execution always means the zero-code-change path above. gRPC linear programming client and gRPC routing client are the two Python clients. gRPC client means any program that opens the connection itself, including a custom CuOptRemoteService client.

When to Choose Which Path#

  • Remote execution — drop-in remote LP, MIP, and QP solves with no code changes, including modeling-language integrations that call the Python solver APIs, cuOptSolve, or cuopt_cli.

  • gRPC linear programming client — explicit LP, MIP, and QP job control: submit now, wait or poll later, cancel, stream solver logs, stream MIP incumbents.

  • gRPC routing client — explicit VRP, TSP, and PDP job control: submit now, wait or poll later, cancel.

  • Custom ``CuOptRemoteService`` client — non-Python (or fully custom) integrations that speak the protos directly. See gRPC API (Reference).

Start with Quick Start (install, server, and a minimal LP). Use gRPC Linear Programming Client for the gRPC linear programming client and gRPC Routing Client for the gRPC routing client. See Advanced Configuration for TLS, Docker, environment variables, and troubleshooting, and Examples for additional patterns.

See System Requirements for GPU, CUDA, and OS requirements.