Connection and health checks (IRPCTest)
An interface for testing connection between a client and the server.
This interface offers simple methods to test if a connection is valid, either to the server (without a need to login) or to a specific vault (requires login).
| gRPC service | MFiles.IRPCTest |
|---|---|
| Book and level | Vault API, standard |
| Methods | 9 |
| Proto file | mfiles/IRPCTest.proto |
Overview
Connectivity, throughput and health checks. Each method checks one thing and returns; none of them reads or changes objects or metadata, and several need no session at all.
| Job | Methods | Session |
|---|---|---|
| Round-trip time to the server | TestConnectionToServer |
None |
| Is the vault session still valid? | TestConnectionToVault |
Vault |
| Download and upload throughput | DownloadTestFile_Begin, UploadTestFile_Begin |
Vault |
| Is a vault ready? (load balancers) | CheckVaultHealthAnonymous, TestVaultAvailability |
None |
| Is the server ready? | CheckServerHealthAnonymous |
None |
| Which server check fails? | GetServerHealth |
Any |
| Connection from this server to another | TestConnectionToRemoteServer |
None |
Where another service is the better choice:
- To find out whether the server answers and which version it runs, call
QueryVersion. It needs no session either and is
the usual first call of a client. Use
TestConnectionToServerwhen you want to time repeated round trips with an empty request and response. - To keep a session from expiring, call KeepAlive.
TestConnectionToVaultchecks the session but does not extend its lifetime.
Errors follow the usual pattern: a missing, invalid or logged-out session is reported as gRPC
status UNAUTHENTICATED without error trailers, and every other failure as UNKNOWN with the
M-Files error stack in the mfiles-error-serialized-bin trailer. See
Errors and
Connecting to the server.
Highlighted methods
| Method | Summary | Facts |
|---|---|---|
| TestConnectionToServer | Does nothing and returns at once. Use it to check that calls reach the server and to measure the round-trip time. | write no session |
| TestConnectionToVault | Checks that the session is a valid vault session, and does nothing else. | write session idempotent |
| CheckVaultHealthAnonymous | Succeeds when a vault on this server is ready for use; fails otherwise. No session needed. Made for load balancer health probes. | read no session idempotent |
| DownloadTestFile_Begin | Creates a file of random bytes on the server and opens a download session for it, for measuring download throughput. | read session idempotent returns metadata structure version |
Other methods
| Method | Summary | Facts |
|---|---|---|
| CheckServerHealthAnonymous | Succeeds when the server and all its vaults have finished starting; fails otherwise. No session needed. | read no session idempotent |
| GetServerHealth | Runs the server health checks you select and returns the result of each. | read session idempotent |
| TestConnectionToRemoteServer | Asks this server to connect to another M-Files Server and call TestConnectionToServer there. Normally disabled. | write no session |
| TestVaultAvailability | Checks that a vault on this server is online and that its database and file data storage can be accessed. No session needed. | write no session |
| UploadTestFile_Begin | Starts an upload whose bytes the server discards, for measuring upload throughput. | write session idempotent |