Proxy

This section contains information about the different interfaces for working with the YTsaurus system: HTTP and RPC proxies.

HTTP proxy

HTTP proxy is a universal language-agnostic interface to work with YTsaurus.

Warning

The low-level HTTP API is not a good choice for writing simple and reliable application code. You need to set up proper logging of queries and their correlation IDs labeling, balance the load on the proxy, acquire additional explicit locks on tables, handle errors, repeat actions in some cases, and so on.

We strongly recommend using our supported SDKs for your language (for example, for Python or C++) that already address these issues.

To work in the console, you should use the CLI instead of sending direct HTTP requests.

HTTP proxies differ depending on the query type. Queries to the metainformation tree like get or set are considered relatively light and processed by so called control (light) HTTP proxies.

Read or write queries (read-table, write-table) can potentially transfer a significantly larger amount of data, more heavily load YTsaurus cluster nodes, and are therefore processed by so called heavy proxies (data proxies).

For an example of how to interact with YTsaurus via the HTTP interface, view the HTTP proxy section.

For reference information about the HTTP proxy, see HTTP proxy reference.

RPC proxy

RPC proxy is a special interface for interacting with YTsaurus via the RPC protocol. The RPC proxy is accessed via TCP, port 9013. What basically distinguishes the RPC proxy from the HTTP proxy:

  • Higher query processing speed achieved due to the following features:
    • Work with the RPC proxy is performed using a special internal protocol that is better suited for working with a large number of concurrent queries.
    • In the RPC proxy, a query is sent in native YTsaurus format and does not require additional time and resources for conversion.
    • The ability to maintain compatibility at the user code level with changes in the protocol of interaction of components within a YTsaurus cluster.

The following programming languages are supported:

Examples are available for each programming language.

Previous