Connection and health checks (IRPCTest)

View as Markdown

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 serviceMFiles.IRPCTest
Book and levelVault API, standard
Methods9
Proto filemfiles/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:

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

MethodSummaryFacts
TestConnectionToServerDoes nothing and returns at once. Use it to check that calls reach the server and to measure the round-trip time.write no session
TestConnectionToVaultChecks that the session is a valid vault session, and does nothing else.write session idempotent
CheckVaultHealthAnonymousSucceeds 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_BeginCreates 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

MethodSummaryFacts
CheckServerHealthAnonymousSucceeds when the server and all its vaults have finished starting; fails otherwise. No session needed.read no session idempotent
GetServerHealthRuns the server health checks you select and returns the result of each.read session idempotent
TestConnectionToRemoteServerAsks this server to connect to another M-Files Server and call TestConnectionToServer there. Normally disabled.write no session
TestVaultAvailabilityChecks 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_BeginStarts an upload whose bytes the server discards, for measuring upload throughput.write session idempotent