Distributed Graph Servers

Kinetica enables distributed graph servers, in which the additional CPU power from distributed graph server hosts can be leveraged to make all types of graph operations more performant.

Leveraging Distributed Graph Servers

Each graph server will be provided an ID that will allow users to reference it during graph API endpoint operations. The system will automatically leverage distributed graph servers for each graph endpoint. For situations that demand more control over where graph operations are performed, users can specify the graph server ID when sending a graph-related endpoint request. The following behavior per endpoint is available.

Important

In any of the situations where a specific graph server ID is provided and the related graph does not exist on a provided server, an error will be returned.

EndpointServer ID ProvidedSuccess ConditionBehavior
/create/graph<none> (default)Enough RAM on at least one graph server.Creates the graph on the graph server with the most available memory.
allEnough RAM on all graph servers.Replicates the graph on all graph servers.
<id>[, <id2>, <id3>...]Enough RAM on the specified graph server(s).Creates the graph on the specified graph server(s).
/delete/graphN/AN/ADeletes the graph on all graph servers.
/match/graph<none> (default)Graph exists on at least one server.Matches the graph using the graph server with the most available CPU power.
<id>[, <id2>, <id3>...]Graph exists on the specified graph server(s).Matches the graph using the specified graph server(s).
/modify/graphN/AN/AModifies the graph on all graph servers.
/query/graph<none> (default)Graph exists on at least one server.Queries the graph using the graph server with the most available CPU power.
<id>[, <id2>, <id3>...]Graph exists on the specified graph server(s).Queries the graph using the specified graph server(s).
/show/graph<none> (default)N/AShows all graphs on all servers.
<id>[, <id2>, <id3>...]Graph exists on the specified graph server(s).Shows all graphs on the specified server(s).
/solve/graph<none> (default)Graph exists on at least one server.

If the solver is SHORTEST_PATH:

  • Solves the graph using all available servers

If the solver is anything other than SHORTEST_PATH:

  • Solves the graph using the graph server with the most available CPU power
<id>[, <id2>, <id3>...]Graph exists on the specified graph servers.

If the solver is SHORTEST_PATH:

  • Solves the graph by distributing the work amongst all provided servers

If the solver is anything other than SHORTEST_PATH:

  • Solves the graph using the graph server(s) with the most available CPU power

Examples

Using the REST API, creating a graph on all available graph servers might look like this:

Create Graph on All Servers
{
    "graph_name": "dc_shape_graph",
    "directed_graph": true,
    "nodes": [],
    "edges": [
        "dc_shape.shape AS WKTLINE",
        "dc_shape.direction AS DIRECTION"
    ],
    "weights": [
        "dc_shape.shape AS EDGE_WKTLINE",
        "dc_shape.direction AS EDGE_DIRECTION",
        "ST_Length(dc_shape.shape,1)/(ST_NPOINTS(dc_shape.shape)-1) AS VALUESPECIFIED"
    ],
    "restrictions": [],
    "options": {
        "server_id": "all",
    }
}

Using the REST API, solving a graph using the SHORTEST_PATH solver type and only using specified graph servers might look like this:

Solve Graph on Specific Servers
{
    "graph_name": "dc_shape_graph",
    "weights_on_edges": [],
    "restrictions": [],
    "solver_type": "SHORTEST_PATH",
    "source_nodes": [
        "{'POINT(-77.03511810000001 38.89876175)'} AS WKTPOINT",
        "{'POINT(-77.01331329 38.90132141)'} AS WKTPOINT",
        "{'POINT(-77.00804137999999 38.89706039)'} AS WKTPOINT",
    ],
    "destination_nodes": [
        "{'POINT(-77.0058078 38.8746344)'} AS WKTPOINT"
        "{'POINT(-77.03193664550781 38.91188049316406)'} AS WKTPOINT",
        "{'POINT(-77.01364898999999 38.90723038)'} AS WKTPOINT",
    ],
    "solution_table": "dc_shape_graph_solved_shortest_path",
    "options": {
        "server_id": "0,1,2"
    }
}