Patent ID: 11888728
Assignee: PUBNUB, INC.
Field: Digital communication (Electrical engineering)
Classification: CPC H | IPC H

Claim 0:
1. A method of detecting latency in a communication network, the method comprising:
by a system comprising a processor and a first data center of a plurality of geographically distributed data centers:
receiving a plurality of messages that are to be published via a communication network;
receiving a plurality of queries from an electronic device of a first subscriber;
in response to each query, transmitting one or more of messages from the first data center to the first subscriber via the communication network;
for each query, determining a processing time (req_ti) that the system took to respond to the query;
receiving, from the electronic device of the first subscriber for one or more of the transmitted messages, an acknowledgement of receipt;
for each acknowledgement of receipt, determining a total time (timen) representing a time from when the system received an associated query from the first subscriber to a time at which the first data center received the acknowledgement;
assessing latency of the communication network for the first subscriber as a function of the determined processing times (req_ti) and the determined total times (timen);
in response to a plurality of queries from a plurality of additional subscribers, transmitting an additional one or more of the messages to each additional subscriber from the first data center via the communication network;
for each query from each additional subscriber:
determining a processing time (req_ti) that the system took to respond to the query from the additional subscriber, and
determining a total time (timen) representing a time from when the system received the query from the additional subscriber to a time at which the first data center received an acknowledgement from the additional subscriber; and
assessing an aggregated latency of the communication network as a function of the determined processing times (req_ti) and the determined total times (timen) for the queries from the additional subscribers;
comparing the aggregated latency of the communication network with the assessed latency of the communication network for the first subscriber; and
upon detecting that the assessed latency of the communication network for the first subscriber exceeds the aggregated latency of the communication network by a threshold, selecting, from the geographically distributed data centers, an alternate data center to transmit future messages to the first subscriber.