System and method for managing messaging services and rate limit in a distributed network environment
The system assigns leader and follower rate limiting instances to manage messaging accounts, addressing synchronization overhead issues in traditional distributed rate limiters by ensuring consistent availability and improved throughput.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-09-25
- Publication Date
- 2026-04-02
AI Technical Summary
Traditional distributed rate limiters face excessive processing overheads due to synchronization between multiple instances, leading to increased latency and reduced throughput, especially when handling high volumes of messaging requests.
A system and method that assigns a leader rate limiting instance and follower instances to manage messaging accounts, allowing seamless redirection of requests to available follower instances if the leader becomes unavailable, minimizing synchronization overhead and ensuring consistent messaging service availability.
Enhances throughput and fault tolerance while efficiently managing messaging limits and throttling requests, reducing synchronization overhead and maintaining consistent messaging service availability.
Smart Images

Figure IN2025051560_02042026_PF_FP_ABST
Abstract
Description
SYSTEM AND METHOD FOR MANAGING MESSAGING SERVICESAND RATE LIMIT IN A DISTRIBUTED NETWORK ENVIRONMENTTECHNICAL FIELD
[0001] The embodiments of the present disclosure generally relate to the field of processing of messages in a network environment. More particularly, the present disclosure relates to a system and a method for managing messaging services and rate limit in a distributed network environment.BACKGROUND OF THE INVENTION
[0002] The subject matter disclosed in the background section should not be assumed or construed to be prior art merely because of its mention in the background section. Similarly, any problem statement mentioned in the background section or its association with the subject matter of the background section should not be assumed or construed to have been previously recognized in the prior art.
[0003] In a distributed computing environment, multiple computing devices are connected to communicate with each other. The computing devices may utilize messaging services to send messaging requests to other computing devices in the network. While the messaging services are configured to handle multiple messaging requests at a time, but underlying computing resources of the messaging services get burdened when the messaging service is utilized to send an excessive number of messages by a single or multiple users at a time.
[0004] Further, computing resources of the messaging services also get overwhelmed when the messaging services are requested to send large number of spam messages to the users. In such a scenario, the messaging service is unable to attend genuine requests for sending messages from genuine users two other users. To avoid such misuse of the messaging services, distributed rate limiting is employed for controlling a flow of messaging requests from multiple users so thatcomputing resources are used efficiently, and the messaging service is not overwhelmed by an excessive traffic. Rate limiting corresponds to limiting a total number of messages that can be sent by a user during a time-period and also limiting the rate of sending messages in a defined time. However, traditional approaches to distributed rate limiting often encounter significant challenges that limit their effectiveness and throughput.
[0005] One of the primary issues faced by traditional distributed rate limiters is excessive processing overheads associated with synchronization between multiple rate limiters. In a typical implementation, each rate limiting instance of the distributed system must coordinate with others true heartbeat mechanism to enforce global rate limits. This coordination often involves managing a shared quota of allowable messaging requests and enforcing throttling limits uniformly across all the users.
[0006] To achieve the rate limiting, traditional systems frequently rely on synchronizing a state of rate limits across the multiple rate limiting instances, thereby introducing a substantial synchronization overhead. Each request processed by the distributed system requires inter-communication among the rate limiting instances to state of remaining rate limit for a user, leading to increased latency and reduced throughput. This synchronization overhead creates bottlenecks, particularly as the number of rate limiting instances scales to serve increasing number of users.
[0007] As a result, the traditional distributed rate limiters often struggle to achieve optimal throughput. The need for frequent synchronization between the rate limiting instances constrains ability of the messaging services to handle high volumes of requests efficiently.
[0008] In light of the above-mentioned drawbacks and shortcomings of the traditional methods of distributed rate limiting, there lies a need for an improved system and method for distributed rate limiting for messaging services.SUMMARY
[0009] The following embodiments present a simplified summary to provide a basic understanding of some aspects of the disclosed invention. This summary is not an extensive overview, and it is not intended to identify key / critical elements or to delineate the scope thereof. Its sole purpose is to present some concepts in a simplified form as a prelude to the more detailed description that is presented later. \
[0010] According to an embodiment of the present disclosure, disclosed is a method for managing messaging services in a distributed network environment. The method comprises assigning, by a messaging service module, a first rate limiting instance and one or more second rate limiting instances from a plurality of rate limiting instances corresponding to a messaging account provisioned with the messaging service module. The method further comprises initiating, by the messaging service module, establishment of a connection with at least one of the first rate limiting instance and the one or more second rate limiting instances among the plurality of rate limiting instances. Further, the method comprises transmitting, by the messaging service module using a transceiver module, information corresponding to a maximum message quota and a throttling limit associated with the provisioned messaging account, to the plurality of rate limiting instances upon establishment of the connection. Furthermore, the method comprises receiving, by the messaging service module using the transceiver module, a request from a source device of a plurality of devices for sending a message to one or more target devices of the plurality of devices corresponding to the messaging account. Thereafter, the method comprises transmitting, by the transceiver module, the request for sending the message to the one or more target devices to one of the first rate limiting instance or the one or more second rate limiting instances.
[0011] In some aspects of the present disclosure, for transmitting the request for sending the message, the method comprises determining, by the messaging service module via the established connection, an availability or non-availability of the first rate limiting instance for sending the message to the one or more target devices of the plurality of devices. Further, the method comprises performing, by the messaging service module, one of transmitting, based on the determination that thefirst rate limiting instance is available, the request for sending the message to the first rate limiting instance and transmitting, based on the determination that the first rate limiting instance is not available, the request for sending the message to an available rate limiting instance among the one or more second rate limiting instances.
[0012] In some aspects of the present disclosure, the available rate limiting instance is identified based on determining an availability of the assigned one or more second rate limiting instances in an order of the assigned one or more second rate limiting instances.
[0013] In some aspects of the present disclosure, for assigning the first rate limiting instance and one or more second rate limiting instances, the method comprises receiving, by the transceiver module, a request for provisioning the messaging account associated with the source device.
[0014] In some aspects of the present disclosure, the plurality of rate limiting instances are generated at a rate limiting system, and the first rate limiting instance is assigned from the plurality of rate limiting instances in a round robin manner.
[0015] According to another embodiment of the present disclosure, disclosed is a method for managing messaging rate limit in a distributed network environment is disclosed. The method comprises receiving, at a rate limiting module via a reception module, a request from a messaging system for sending a message to one or more target devices of a plurality of devices corresponding to a provisioned messaging account. The request is received at one of a first rate limiting instance or one or more of second rate limiting instances included in the rate limiting module. The method further comprises determining, by the rate limiting module in response to receiving the request via one of the first rate limiting instance or one or more of the second rate limiting instances, whether the request is within each of a remaining message quota of a maximum message quota and a count of remaining messages within a throttling limit of the provisioned messaging account. Further, the method comprises sending, by the rate limiting module via one of the first rate limitinginstance or one or more of the second rate limiting instances, the message to the one or more target devices upon the determination that the request is within each of the remaining message quota and the count of remaining messages.
[0016] In some aspects of the present disclosure, the request is received at one of the first rate limiting instance or one or more of the second rate limiting instances based on an assignment of one of the first rate limiting instance or one or more of the second rate limiting instances from the plurality of rate limiting instances associated with the messaging account.
[0017] In some aspects of the present disclosure, for sending the message to the one or more target devices, the method comprises receiving, by the rate limiting module via the first rate limiting instance, the request for sending the message to the one or more target devices based on an availability of the first rate limiting instance. Further, the method comprises determining, by the rate limiting module via the first rate limiting instance, whether the request is within each of the remaining message quota and the count of remaining messages. The method further comprises sending, by the rate limiting module via the first rate limiting instance, the message to the one or more target devices upon the determination that the request is within each of the remaining message quota and the count of remaining messages.
[0018] In some aspects of the present disclosure, for sending the message to the one or more target devices, the method comprises receiving, by the rate limiting module via a first available rate limiting instance among the one or more second rate limiting instances, the request for sending the message to the one or more target devices based on a non-availability of the first rate limiting instance. Further, the method comprises determining, by the rate limiting module via the first available rate limiting instance among the one or more second rate limiting instances, whether the request is within each of the remaining message quota and the count of remaining messages. The method further comprises sending, by the rate limiting module via the first available rate limiting instance among the one or more second rate limiting instances, the message to the one or more target devices upon the determination thatthe request is within each of the remaining message quota and the count of remaining messages.
[0019] In some aspects of the present disclosure, the method comprises periodically performing a synchronization operation, by the rate limiting module via at least one of the first rate limiting instance and the one or more second rate limiting instances, for one or more of updating, in a database, data related to a change in the remaining message quota and the count of remaining messages corresponding to the messaging account and fetching, from the database, data related to the remaining message quota and the count of remaining messages corresponding to the messaging account.
[0020] According to another embodiment of the present disclosure, disclosed is a messaging system for managing messaging services in a distributed network environment is disclosed. The messaging system comprises a messaging service module configured to assign by a first rate limiting instance and one or more second rate limiting instances from a plurality of rate limiting instances corresponding to a messaging account provisioned with the messaging service module. The messaging service module is further configured to initiate establishment of a connection with at least one of the first rate limiting instance and the one or more second rate limiting instances among the plurality of rate limiting instances. The messaging system further comprises a transceiver module configured to transmit information corresponding to a maximum message quota and a throttling limit associated with the provisioned messaging account, to the plurality of rate limiting instances upon establishment of the connection. The transceiver module is further configured to receive a request from a source device of a plurality of devices for sending a message to one or more target devices of the plurality of devices corresponding to the messaging account and transmit the request for sending the message to the one or more target devices to one of the first rate limiting instance or the one or more second rate limiting instances.
[0021] In some aspects of the present disclosure, for transmitting the request for sending the message, the messaging service module is configured to determine, bythe messaging service module via the established connection, an availability or nonavailability of the first rate limiting instance for sending the message to the one or more target devices of the plurality of devices. Further, the messaging service module is configured to perform, by the messaging service module, one of transmit, based on the determination that the first rate limiting instance is available, the request for sending the message to the first rate limiting instance and transmit, based on the determination that the first rate limiting instance is not available, the request for sending the message to an available rate limiting instance among the one or more second rate limiting instances.
[0022] In some aspects of the present disclosure, the available rate limiting instance is identified based on determining an availability of the assigned one or more second rate limiting instances in an order of the assigned one or more follower rate limiting instances.
[0023] In some aspects of the present disclosure, for assigning the first rate limiting instance and one or more second rate limiting instances, the transceiver module is configured to receive a request for provisioning the messaging account associated with the source device.
[0024] In some aspects of the present disclosure, the plurality of rate limiting instances are generated at a rate limiting system, and the first rate limiting instance is assigned from the plurality of rate limiting instances in a round robin manner.
[0025] According to another embodiment of the present disclosure, disclosed is a rate limiting system for managing messaging rate limit in a distributed network environment is disclosed. The rate limiting system comprising a rate limiting module and a reception module. The reception module is configured to receive, at a rate limiting module, a request from a messaging system for sending a message to a one or more target devices of a plurality of devices corresponding to a provisioned messaging account. The request is received at one of a first rate limiting instance or one or more of second rate limiting instances included in the rate limiting module. The rate limiting module is configured to determine, in response to receiving therequest via one of the first rate limiting instance or one or more of the second rate limiting instances, whether the request is within each of a remaining message quota of a maximum message quota and a count of remaining messages within a throttling limit of the provisioned messaging account. The rate limiting module is configured to send, via one of the first rate limiting instance or one or more of the second rate limiting instances, the message to the one or more target devices upon the determination that the request is within each of the remaining message quota and the count of remaining messages.
[0026] In some aspects of the present disclosure, the request is received at one of the first rate limiting instance or one or more of the second rate limiting instances based on an assignment of one of the first rate limiting instance or one or more of the second rate limiting instances from the plurality of rate limiting instances associated with the messaging account.
[0027] In some aspects of the present disclosure, for sending the message to the one or more target devices, the rate limiting module is configured to receive, via the first rate limiting instance, the request for sending the message to the one or more target devices based on an availability of the first rate limiting instance. The rate limiting module is configured to determine, via the first rate limiting instance, whether the request is within each of the remaining message quota and the count of remaining messages and send, via the first rate limiting instance, the message to the one or more target devices upon the determination that the request is within each of the remaining message quota and the count of remaining messages.
[0028] In some aspects of the present disclosure, for sending the message to the one or more target devices, the rate limiting module is configured to receive, viathe first available rate limiting instance among the one or more second rate limiting instances, the request for sending the message to the one or more target devices based on a non-availability of the first rate limiting instance. The rate limiting module is configured to determine, via the first available rate limiting instance among the one or more second rate limiting instances, whether the request is withineach of the remaining message quota and the count of remaining messages. The rate limiting module is configured to send, via the first available rate limiting instance among the one or more second rate limiting instances, the message to the one or more target devices upon the determination that the request is within each of the remaining message quota and the count of remaining messages.
[0029] In some aspects of the present disclosure, the rate limiting module is configured to periodically perform a synchronization operation, via at least one of the first rate limiting instance and the one or more second rate limiting instances, for one or more of update, in a database, data related to a change in the remaining message quota and the count of remaining messages corresponding to the messaging account and fetch, from the database, data related to the remaining message quota and the count of remaining messages corresponding to the messaging account.
[0030] According to another embodiment of the present disclosure, disclosed is a computer program product for managing messaging services in a distributed network environment is disclosed. The computer program product comprising computer-executable instructions that are stored on a non-transitory computer- readable medium and that, when executed by at least one processor performs operations comprising assigning a first rate limiting instance and one or more second rate limiting instances from a plurality of rate limiting instances corresponding to a provisioned messaging account. The operations comprise initiating establishment of a connection with at least one of the first rate limiting instance and the one or more second rate limiting instances among the plurality of rate limiting instances. Further, the operations comprise transmitting information corresponding to a maximum message quota and a throttling limit associated with the provisioned messaging account, to the plurality of rate limiting instances upon establishment of the connection. Furthermore, the operations comprise receiving a request from a source device of a plurality of devices for sending a message to one or more target devices of the plurality of devices corresponding to the messaging account. Thereafter, the operations comprise transmitting the request for sending themessage to the one or more target devices to one of the first rate limiting instance or the one or more second rate limiting instances.BRIEF DESCRIPTION OF DRAWINGS
[0031] Various embodiments disclosed herein will become better understood from the following detailed description when read with the accompanying drawings. The accompanying drawings constitute a part of the present disclosure and illustrate certain non-limiting embodiments of inventive concepts. Further, components and elements shown in the drawings are not necessarily to scale, emphasis instead being placed upon clearly illustrating the principles of the present disclosure. For consistency and ease of understanding, similar components and elements are annotated by reference numerals in the exemplary drawings.
[0032] FIG. 1 illustrates a block diagram of an example system for managing messaging services and rate limit in a distributed network environment, in accordance with an embodiment of the present disclosure.
[0033] FIG. 2 illustrates a block diagram depicting a detailed system architecture of a client, in accordance with an embodiment of the present disclosure.
[0034] FIG. 3 illustrates a block diagram depicting a detailed system architecture of a remote server 140, in accordance with an embodiment of the present disclosure.
[0035] FIG. 4 illustrates an example environment for managing messaging services and rate limit in the distributed network, in accordance with an embodiment of the present disclosure.
[0036] FIG. 5 illustrates a flowchart depicting a method for managing messaging services in the distributed network environment, in accordance with an embodiment of the present disclosure.
[0037] FIG. 6 illustrates a flowchart depicting a method for managing messaging rate limit in the distributed network environment, in accordance with an embodiment of the present disclosure.DETAILED DESCRIPTION OF THE INVENTION
[0038] Inventive concepts of the present disclosure will now be described more fully hereinafter with reference to the accompanying drawings, in which examples of one or more embodiments of inventive concepts are shown. Inventive concepts may, however, be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Further, the one or more embodiments disclosed herein are provided to describe the inventive concept thoroughly and completely, and to fully convey the scope of each of the present inventive concepts to those skilled in the art. Furthermore, it should be noted that the embodiments disclosed herein are not mutually exclusive concepts. Accordingly, one or more components from one embodiment may be tacitly assumed to be present or used in any other embodiment.
[0039] The following description presents various embodiments of the present disclosure. The embodiments disclosed herein are presented as teaching examples and are not to be construed as limiting the scope of the present disclosure. The present disclosure should in no way be limited to the illustrative implementations, drawings, and techniques illustrated below, including the exemplary design and implementation illustrated and described herein, but may be modified, omitted, or expanded upon without departing from the scope of the present disclosure.
[0040] The following description contains specific information pertaining to embodiments in the present disclosure. The detailed description uses the phrases “in some embodiments” or “some implementations” which may each refer to one or more or all of the same or different embodiments or implementations. The term “some” as used herein is defined as “one, or more than one, or all.” Accordingly, the terms “one,” “more than one,” “more than one, but not all” or “all” would all fall under the definition of “some.” In view of the same, the terms, for example, “in anembodiment” or “in an implementation” refers to one embodiment or one implementation and the term, for example, “in one or more embodiments” refers to “at least one embodiment, or more than one embodiment, or all embodiments.” Further, the term, for example, “in one or more implementations” refers to “at least one implementation, or more than one implementation, or all implementations.
[0041] The term “comprising,” when utilized, means “including, but not necessarily limited to;” it specifically indicates open-ended inclusion in the so-described one or more listed features, elements in a combination, unless otherwise stated with limiting language. Furthermore, to the extent that the terms “includes,” “has,” “have,” “contains,” and other similar words are used in either the detailed description, such terms are intended to be inclusive in a manner similar to the term “comprising.”
[0042] In the following description, for the purposes of explanation, various specific details are set forth in order to provide a thorough understanding of embodiments of the present disclosure. It will be apparent, however, that embodiments of the present disclosure may be practiced without these specific details. Several features described hereafter can each be used independently of one another or with any combination of other features.
[0043] The description provided herein discloses exemplary embodiments only and is not intended to limit the scope, applicability, or configuration of the present disclosure. Rather, the foregoing description of the exemplary embodiments will provide those skilled in the art with an enabling description for implementing any of the exemplary embodiments. Specific details are given in the following description to provide a thorough understanding of the embodiments. However, it may be understood by one of the ordinary skilled in the art that the embodiments disclosed herein may be practiced without these specific details.
[0044] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As usedherein the description, the singular forms "a", "an", and "the" include plural forms unless the context of the invention indicates otherwise.
[0045] The terminology and structure employed herein are for describing, teaching, and illuminating some embodiments and their specific features and elements and do not limit, restrict, or reduce the scope of the present disclosure. Accordingly, unless otherwise defined, all terms, and especially any technical and / or scientific terms, used herein may be taken to have the same meaning as commonly understood by one having ordinary skill in the art.
[0046] In the disclosure, various embodiments are described using terms used in some communication standards (e.g., 3rd Generation Partnership Project (3GPP), xRadio Access Network (xRAN), and Open-Radio Access Network (O-RAN)), but these are merely examples for description. Various embodiments of the disclosure may also be easily modified and applied to other communication systems.
[0047] In order to facilitate an understanding of the disclosed invention, a number of terms are defined below.
[0048] A messaging system is responsible for handling creation, transmission, and delivery of messages across a distributed network. The messaging system may correspond to a server, a client device, a microservice deployed on the client device, or a software module deployed on the client device.
[0049] A rate limiting system is a control mechanism that enforces messaging limits to prevent overuse or abuse of messaging resources. The rate limiting system may correspond to a server, a remote device, a microservice deployed on the remote device, or a software module deployed on the remote device.
[0050] An object of the present disclosure is to provide a system and a method for managing messaging services and rate limit in a distributed network environment that provides a higher throughput. Another object of the present disclosure is to provide a system and a method that enhances fault tolerance in a distributed rate limiting for messaging services. Another object of the present disclosure is toprovide the system and the method that minimizes synchronization overhead assigning during distributed rate limiting for messaging services. Yet another object of the present disclosure is to provide the system and the method for managing messaging services and rate limit in a distributed network environment that efficiently manages messaging limits and throttles messaging requests exceeding the limits. Still another object of the present disclosure is to provide the system and the method for managing messaging services and rate limit in a distributed network environment that ensures consistency in messaging services availability and also enhances fault tolerance.
[0051] Embodiments of the present disclosure will be described below in detail with reference to the accompanying drawings. FIG. 1 through FIG. 4, discussed below, and the one or more embodiments used to describe the principles of the present disclosure are by way of illustration only and should not be construed in any way to limit the scope of the present disclosure. Those skilled in the art will understand that the principles of the present disclosure may be implemented in any suitably arranged system or device.
[0052] The present disclosure relates to a system and a method for managing messaging services and rate limit in a distributed network environment. The distributed network environment includes network-based message communication infrastructure elements deployed in a distributed manner across a communication network to handle message data traffic. In one implementation, the message data traffic generally comprises electronic mails and messages transmitted over messaging applications. In another implementation, the message data traffic generally comprises messages transmitted between different network elements of the communication network, such as among network elements of a core network or with network elements across radio network. To provide continuous messaging services to users of the communication network, the system and the method for managing messaging services in the distributed network environment is configured to assign a leader rate limiting instance and one or more follower rate limiting instances to a specific messaging account of each user. The system and the methodis further configured to direct a messaging request to a destination via the leader rate limiting instance. In an event when the leader rate limiting instance becoming unavailable, the messaging requests from the messaging account are seamlessly redirected to an assigned follower rate limiting instance, ensuring consistent availability of messaging services to the users.
[0053] FIG. 1 illustrates a block diagram of an example system 100 for managing messaging services and rate limit in a distributed network environment, in accordance with an embodiment of the present disclosure. The system 100 may comprise a plurality of devices 110-1 to 110-n, a messaging system 120 (alternatively referred to as a “client 120”), a network 130, a rate limiting system 140 (alternatively referred to as a “remote server 140”), and a database 150.
[0054] The plurality of devices 110-1 to 110-n are connected to the client 120 for accessing messenger services or messaging services hosted over the client 120. For sake of brevity, the plurality of devices has been referred as a device 110 or devices 110. In one embodiment, the plurality of devices 110-1 to 110-n may correspond to a user device configured to send or receive messages. The devices 110 may include both one or more source devices (alternatively referred to as “source device”) configured to initiate a request for accessing the messaging services for sending a plurality of messages and one or more target device (alternatively referred to as “target device”) configured to receive the messages. The device 110 may essentially be a communication device having a capability of performing network communications via a messaging application. The device 110 may include portable computing devices such as laptops, tablet computers, handheld computer, mobile phones, wearable computers, or any other communication device. The device 110 may access the communication network via a social media service, an instant messaging application that allows users to publish or transmit text messages, images, audio, video, user location, or other media messages to other users. In another embodiment, the one or more devices 110-1 to 110-n may correspond to an application configured to send or receive text messages, images, audio, video, user location, or other media messages.
[0055] The messaging system 120 is configured to manage the messaging services. In one embodiment, the messaging system 120 may correspond to a client side server. In another embodiment, the messaging system 120 may correspond to a microservice implemented on a client device. The microservices are independently deployable software in which complex applications are composed of small and independent processes. The microservice may be developed as a suite of small services, each running in its own process and communicating with lightweight mechanisms such as Application Programming Interface (API). The microservices may adhere to a well-defined API.
[0056] The source device among the device 110 sends a request (alternatively referred to as a messaging request) to the client 120 for sending a message to the target device. The client side server may comprise a processor 122 communicably coupled with a memory 124. The memory 124 stores a set of instructions for executing a messaging service 126 for sending the messages. The messaging service 126 further comprises a plurality of messenger instances (also referred to as messaging instances) depicted as messenger instance 1 (or messaging instance 1) through messenger instance n (or messaging instance n). The messenger instances are configured to handle messaging requests from a plurality of messaging accounts from the source devices. The messaging instances may correspond to logical or physical units within the messaging service. In one embodiment, the messenger instances may be configured to handle and route messaging requests based on a group of device. The messenger instances may operate independently or in coordination with other messaging instances.
[0057] The network 130 may include wired connections, wireless connections such as a proprietary Internet Protocol (IP) network, Internet, or in accordance with other wireless communication standards such as Worldwide Interoperability for Microwave Access (WiMAX), Wi-Fi 802.11a / b / g / n / ac, or a combination of wired and wireless connections.
[0058] The messaging instances of the client 120 are connected with the rate limiting system 140 via the network 130. The rate limiting system 140 is configured to manage the messaging rate limit for the messages. In one embodiment, the rate limiting system 140 may correspond to a remote side server. In another embodiment, the rate limiting system 140 may correspond to a microservice implemented on a remote device.
[0059] The rate limiting system 140 comprises a rate limiter 142. The rate limiter 142 may generate a plurality of rate limiting instances 142-1 through 142-n (collectively referred to as rate limiting instances 142) for enforcing rate limiting policies for a plurality of messaging accounts corresponding to the devices 110. In another embodiment, the rate limiter 142 may employ a distributed arrangement of rate limiting instances comprising plurality of computing resources such as Central Processing Units (CPUs), databases, and devices.
[0060] The messaging instance 1 through messaging instance n are connected with the plurality of rate limiting instances 142-1 through 142-n through a Remote Procedural Call (RPC) connection. The RPC is a software communication protocol that one computing program uses to request a service from another computing program located on a different system and network, without having to understand details of the network. The RPC is used to call other processes on remote server 140 as if the process were a local system to the client server 120. The RPC acts like a low-level transport protocol for carrying data packets between communicating programs.
[0061] The client 120 makes remote procedure calls to the remote server 140 via the network 130. The remote server 140 offers one or more sets of remote procedures to the client 120 for processing messaging requests of the devices 110. The client 120 transmits the messaging request received from the source device to an assigned rate limiting instance of the plurality of rate limiting instances 142. In a scenario, when the RPC connection between a messaging instance among the messaging instance 1 through messaging instance n and the assigned rate limitinginstance among the rate limiting instances 142 gets broken, the assigned rate limiting instance may not receive further messaging requests from the messaging instance.
[0062] In an embodiment, each of the messaging system 120 and the rate limiting system 140 may be implemented over a group of servers such as a cloud-based server, an application server, a content server, a host server, a web server, a database server, or a server hosted over a desktop computer. Examples of the servers may include, but are not limited to, personal computers, laptops, mini -computers, mainframe computers, any non-transient and tangible machine that can execute a machine-readable code, cloud-based servers, distributed server networks, or a network of computer systems. The servers may be realized through various webbased technologies such as, but not limited to, a Java web -framework, a .NET framework, a personal home page (PHP) framework, or any web-application framework.
[0063] The remote server 140 is further connected to the database 150 via the network 130. The database 150 is configured to store and synchronize data to and from the plurality of rate limiting instances corresponding to each messaging account. The database 310 may be implemented as one or more of centralized database, Relational Database Management System (RDBMS), Non-Relational Database Management System, Hierarchical Database Management System, Network Database Management System, an in-memory database including a distributed in-memory data storage, distributed database, or a distributed file system. In another embodiment, the system 100 may utilize a distributed data storage for synchronizing data to and from the plurality of rate limiting instances corresponding to each messaging account instead of the database 150.
[0064] Although FIG. 1 shows exemplary components of the system 100, in other implementations, the system 100 may include fewer components, different components, differently arranged components, or additional components than depicted in FIG. 1. Additionally, or alternatively, one or more components of thesystem 100 may perform functions described as being performed by one or more other components of the system 100.
[0065] FIG. 2 illustrates a block diagram depicting a detailed system architecture of the client 120, in accordance with an embodiment of the present disclosure. The embodiment of the client 120 as shown in FIG. 2 is for illustration only. However, the server 140 may come in a wide variety of configurations, and FIG. 2 does not limit the scope of the present disclosure to any particular implementation of the client 120.
[0066] The client 120 may comprise at least one processor 202 (alternatively referred to as a processor 202), a memory 204, interface(s) 206, a transceiver module 208, a messaging service module 210, and a communication interface 212. Components of the client 120 are coupled to each other via a communication bus 214. Other embodiments of the client 120 may be used without departing from the scope of this disclosure.
[0067] The processor 202 (same as the processor 102) may correspond to one or more general purpose processors and / or one or more special purpose processors such as digital signal processors, Field Programmable Gate Array (FPGA) processor, a microprocessor, a digital signal processor, an application specific integrated circuit, a microcontroller, a state machine, or ay any type of programmable logic array.
[0068] The processor 202 may include various processing circuitry and communicates with the memory 204, the interface(s) 206, the transceiver module 208, the messaging service module 210, and the communication interface 212 via the communication bus 214. Examples of the communication bus 214 may include, but are not limited to, a Peripheral Component Interconnect (PCI) / PCI Extended (PCI-X) bus, Small Computer System Interface (SCSI), Universal Serial Bus (USB), and a Front Side Bus (FSB). Aspects of the present disclosure are intended to include or otherwise cover any type of coupling means present or related to later developed technologies, that may be configured to connect the processor 202 to theother subsystems of the client 120 without deviating from the scope of the present disclosure.
[0069] The processor 202 is configured to execute instructions stored in the memory 204 (same as the memory 124) and to perform various processes. The processor 202 may also include a plurality of processing engines i.e., information processing units for controlling overall operation of the client 120. For example, the processor 202 is configured to execute programs and other processes stored in the memory 204. The processor 202 is further configured to move data into or out of the memory 204 as required by an execution process.
[0070] The memory 204 may store program instructions for performing several functions through which log management for upgradation of the server environment may be performed, by the processor 202. A part of the memory 204 may include non-volatile storage elements. Examples of non-volatile storage elements may include, but are not limited to, non-volatile or non-transitory computer-readable storage devices such as hard drives, magnetic tape, floppy diskettes, optical disks, Compact Disc Read-Only Memories (CD-ROMs), and magneto-optical disks, semiconductor memories, such as ROMs, Random Access Memories (RAMS), Programmable Read-Only Memories PROMs), Erasable PROMs (EPROMs), Electrically Erasable PROMs (EEPROMs), flash memory, magnetic or optical cards, or other type of media / machine -readable medium suitable for storing electronic instructions. The "non-transitory" computer-readable medium is not embodied in a carrier wave or a propagated signal. However, the term "non- transitory" should not be interpreted as the memory 204 is non-movable. In some examples, the memory 204 can be configured to store larger amounts of information. In certain examples, a non-transitory storage medium may store data that can, over time, change (e.g., in RAM or cache). The memory 204 can be an internal storage unit or it can be an external storage unit of the client 120, cloud storage, or any other type of external storage. In some embodiments, when the memory 204 is external to the client 120, the memory 204 may be removably attached to the client 120. Aspects of the present disclosure are intended to include or otherwise cover any datastorage medium as “the memory 204”, without deviating from the scope of the present disclosure.
[0071] In an embodiment, the messaging service module 210 may be implemented as a combination of hardware and software programming (for example, programmable instructions) to implement one or more functionalities of the client 120. In non-limiting examples, described herein, such combinations of hardware and software programming may be implemented in several different ways, without deviating from the scope of the present disclosure. The messaging service module 210 may include suitable logic, circuitry, interfaces, and / or codes. For example, the programming for the messaging service module 210 may be processor-executable instructions stored on a non-transitory machine-readable storage medium and the hardware for the messaging service module 210 may comprise a processing resource (for example, one or more processors), to execute such instructions. In an embodiment, the messaging service module may be further subdivided into different processing units / modules.
[0072] In the present examples, the machine-readable storage medium may store instructions that, when executed by the processing resource, implement the messaging service module 210. In such examples, the client 120 may also comprise the machine-readable storage medium storing the instructions and the processing resource to execute the instructions, or the machine-readable storage medium may be separate but accessible to the server 140 and the processing resource. In other examples, the messaging service module 210 may be implemented using an electronic circuitry.
[0073] The messaging service module 210 is configured to create a messaging account corresponding to the one or more source devices among the devices 110 when a request for provisioning a new account is received. The messaging service module 210 is configured to process the request for provisioning a messaging account associated with the source device of the devices 110. The account provisioning module may configure a new messaging account by fetching a useridentifier or an Internet Protocol (IP) address of the source device requesting the messaging account, and account information corresponding to the source device.
[0074] Upon provisioning the new messaging account, the messaging service module 210 is configured to assign a first rate limiting instance (alternatively referred to as a “leader rate limiting instance”) and one or more second rate limiting instances (alternatively referred to as “follower rate limiting instances) from a plurality of rate limiting instances corresponding to a messaging account provisioned with the messaging service module 210. In an embodiment, the messaging service module 210 may assign the leader rate limiting instance and one or more follower rate limiting instances to provisioned messaging account based on identification information of the rate limiting instances 142. The leader rate limiting instance may be assigned to the provisioned messaging account in a round robin manner among the plurality of rate limiting instances. A rate limiting instance may serve as a leader rate limiting instance for one provisioned account and may serve as a follower rate limiting instance for another provisioned account. In another embodiment, the messaging service module 210 is configured to assign or reassign leader rate limiting instance and one or more follower rate limiting instances to an existing messaging account.
[0075] The messaging service module 210 is configured to establish a connection with at least one of the first rate limiting instance and the one or more second rate limiting instances among the plurality of rate limiting instances. In a non-limiting scenario, the messaging service module 210 may establish a connection with all the plurality of rate limiting instances.
[0076] The messaging service module 210 is configured to transmit, using the transceiver module 208, information corresponding to a maximum message quota and a throttling limit associated with the provisioned messaging account, to at least one of the first rate limiting instance and the one or more second rate limiting instances among the plurality of rate limiting instances among the plurality of rate limiting instances to the plurality of rate limiting instances.
[0077] Further, the messaging service module 210 is configured to receive, using the transceiver module 208, a request for sending a message from the source device to one or more target devices of the devices 110 corresponding to the messaging account. In an example scenario, the request for sending a message to the one or more target devices may be initiated by an enterprise to send bulk promotional messages to the one or more target devices. In another example scenario, the request for sending a message to the one or more target devices may be initiated by a banking institution to send messages containing one time passwords to one or more users on the one or more target devices.
[0078] The messaging service module 210 is configured to transmit, using the transceiver module 208, the request for sending the message to the one or more target devices to one of the first rate limiting instance or the one or more second rate limiting instances based on the assignment.
[0079] For transmitting the request to send the message to the target device, the messaging service module 210 is configured to determine via the established connection, an availability or non-availability of the assigned leader rate limiting instance. If the connection with the leader rate limiting instance is maintained, the messaging service module 210 determines that the leader rate limiting instance is available to process the request for sending the message. Based on the determination that the leader rate limiting instance is available, the messaging service module 210 transmits the request for sending the message to the leader rate limiting instance.
[0080] If the connection with the leader rate limiting instance is broken, the messaging service module 210 determines that the leader rate limiting instance is not available. Based on the determination that the leader rate limiting instance is not available, the messaging service module 210 transmits the request for sending the message to an available rate limiting instance among the one or more follower rate limiting instances.
[0081] Based on an order of assignment of the one or more follower rate limiting instances, the messaging service module 210 determines an availability of a firstfollower rate limiting instance among the one or more follower rate limiting instances. If the first follower rate limiting instance is available, the messaging service module 210 transmits the request for sending the message to first follower rate limiting instance. However, when the messaging service module 210 determines that the first follower rate limiting instance among the one or more follower rate limiting instances, is not available, the messaging service module 210 determines an availability of a second follower rate limiting instance among the one or more follower rate limiting instances, based on the order of assignment.
[0082] If the second follower rate limiting instance among the one or more follower rate limiting instances is available, the messaging service module 210 transmits the request for sending the message to second follower rate limiting instance. However, when the messaging service module 210 determines that the second follower rate limiting instance among the one or more follower rate limiting instances, is not available, the messaging service module 210 determines an availability of a third follower rate limiting instance among the one or more follower rate limiting instances, based on the order of assignment, and in a similar manner, the messaging service module 210 continues to determine the availability or non-availability of the one or more follower rate limiting instances till the request for sending the message is transmitted to an available follower rate limiting instance.
[0083] The transceiver module 208 may receive incoming RF signals, such as signals transmitted by the devices 110. The transceiver module 208 may downconvert the incoming RF signals to generate the IF or baseband signals which may be sent to the receiver processing circuitry. The transceiver module 208 may transmit the processed baseband signals to the processor 202 for further processing. The transceiver module 208 may receive analog or digital data from the processor 202 and may encode, multiplex, and / or digitize the outgoing baseband data to generate processed baseband or IF signals. The transceiver module 208 may further process the outgoing processed baseband or IF signals from the transmit processing circuitry and up-converts the baseband or IF signals to RF signals that may be transmitted to the devices 110 and the remote server 140.
[0084] The interface(s) 206 may include a variety of interfaces such as a communication pathway for one or more components of the client 120 and an Input / Output interface. The I / O interface is configured to connect the processor 202 with I / O devices, storage devices, and the like.
[0085] The I / O interface may include suitable logic, circuitry, interfaces, and / or codes that may be configured to receive input(s). For example, the I / O interface may have an input interface and an output interface. The I / O interface may be configured to receive a request from one or more source devices for provisioning a messaging account and a request for sending the message to the target device. Examples of the input interface may include, but are not limited to, a touch interface, a mouse, and a keyboard, and the output interface includes a digital display, an analog display, or a touch screen display. Aspects of the present disclosure are intended to include or otherwise cover any type of the I / O interface including known, related art, and / or later developed technologies without deviating from the scope of the present disclosure.
[0086] The communication interface 212 may manage communications with the network 130 and the client server 120. For example, the communication interface 208 may manage transmission of the RPC call to the remote server 140 and receiving a response from the remote server 140. The communication interface 212 may include an electronic circuit specific to a standard that enables wired or wireless communication. The communication interface 212 is configured for communicating with external devices via one or more networks.
[0087] Although Fig. 2 illustrates one example of client 120, various changes may be made to Fig. 2. For example, the client 120 may include any number of components in addition to the components shown in Fig. 2. Further, various components in Fig. 2 may be combined, further subdivided, or omitted, and additional components may be added according to particular needs. Functioning of the plurality of modules for log management for upgradation of the server environment is described in greater detail further below.
[0088] FIG. 3 illustrates a block diagram depicting a detailed system architecture of the remote server 140, in accordance with an embodiment of the present disclosure. The embodiment of the remote server 140 as shown in FIG. 3 is for illustration only. However, the remote server 140 may come in a wide variety of configurations, and FIG. 3 does not limit the scope of the present disclosure to any particular implementation of the remote server 140.
[0089] As shown in FIG. 3, the remote server 140 includes one or more processors 302 (hereinafter may also be referred to as “processor 302” or “at least one processor 302”), a memory 304, a rate limiting module 306, a reception module 308, a communication interface 310, and a database 312. Components of the server 140 are coupled to each other via a communication bus 314.
[0090] The processor 302 may correspond to one or more general purpose processors and / or one or more special purpose processors such as digital signal processors, FPGA processor, a microprocessor, a digital signal processor, an application specific integrated circuit, a microcontroller, a state machine, or ay any type of programmable logic array.
[0091] The processor 302 may include various processing circuitry and communicates with memory 304, the rate limiting module 306, the reception module 308, a communication interface 310, and the database 312, via the communication bus 314. Examples of the communication bus 314 may include, but are not limited to, a Peripheral Component Interconnect (PCI) / PCI Extended (PCI- X) bus, Small Computer System Interface (SCSI), Universal Serial Bus (USB), and a Front Side Bus (FSB). Aspects of the present disclosure are intended to include or otherwise cover any type of coupling means present or related to later developed technologies, that may be configured to connect the processor 202 to the other subsystems of the client 120 without deviating from the scope of the present disclosure.
[0092] The processor 302 is configured to execute instructions stored in the memory304 and to perform various processes. The processor 302 may also include aplurality of processing engines i.e., information processing units for controlling overall operation of the remote server 140. For example, the processor 302 is configured to execute programs and other processes stored in the memory 304. The processor 302 is further configured to move data into or out of the memory 304 as required by an execution process.
[0093] The processor 302 may also include a plurality of processing engines i.e., information processing units for controlling overall operation of the server 140. For example, the processor 302 further comprises a rate limiting engine or the rate limiting module 306 (same as rate limiting engine 142) is a suitable logic, circuitry, and / or codes is configured to enforce rate limiting policies for the plurality of messaging accounts corresponding to the devices 110. The policies may include threshold management of the messages and throttling messaging requests corresponding to the provisioned messaging account. The rate limiting module 306 may generate the plurality of rate limiting instances 142 for handling messaging rate limits corresponding to various requests received from the source devices. A rate limiting instance of the plurality of rate limiting instances 142 of the rate limiter 306 is configured to receive from the client server 120, a request for determining a rate limit corresponding to the provisioned messaging account. The rate limit may be determined by a message quota corresponding to the messaging account and a throttling limit corresponding to the messaging account.
[0094] The message quota indicates a threshold limit of the messages provided to a messaging account that can be sent within a pre-defined time-period. The throttling limit indicates a count of messages provided to the messaging account that can be sent by the user per second. The rate limiting instance may determine whether the provisioned messaging account is within the rate limit for sending a message by determining whether request is within a remaining message quota of a maximum message quota and a remaining throttling limit of a maximum throttling limit the corresponding messaging account.
[0095] The rate limiting module 306 is configured to receive via the reception module 308, the request at one of the first rate limiting instance or one or more of the second rate limiting instances included in the rate limiting module 306, from the messaging service module 210 for sending the message to one or more target devices corresponding to the provisioned messaging account.
[0096] In one embodiment, the rate limiting module 306 is configured to receive via the leader rate limiting instance, the request for sending the message to the one or more target devices based on the availability of the leader rate limiting instance. In another embodiment, when the leader rate limiting instance is not available, the rate limiting module 306 is configured to receive via the first available follower rate limiting instance among the one or more follower rate limiting instances, the request for sending the message to the one or more target devices. Along with the request, the rate limiting module 306 is configured to receive from the messaging service module 210, information corresponding to a maximum message quota and a throttling limit associated with the provisioned messaging account.
[0097] Thereafter, the rate limiting module 306 is configured to determine via the leader rate limiting instance or the one or more follower rate limiting instances where the request is received, whether the request is within each of the remaining message quota and the count of remaining messages. The leader rate limiting instance or the one or more follower rate limiting instances where the request is received may fetch data related to the remaining message quota and remaining messages withing the throttling limit corresponding to the new messaging account provisioned from the database 150. The fetched data may be compared with the maximum message quota and the throttling limits applicable on the request received from the messaging service module 210.
[0098] Upon determining that the request from the messaging service module 210 falls within the rate limit corresponding to the messaging account, either the leader rate limiting instance or the one or more follower rate limiting instances process the request from the provisioned messaging account for sending the message. If theleader rate limiting instance is operational and available, the leader rate limiting instance receives and processes the messaging request by sending the message to the one or more target devices. However, when the leader rate limiting instance is not available, the first available follower rate limiting instance of the one or more follower rate limiting instances receives and process the messaging request by sending the message to the one or more target devices.
[0099] In another embodiment, upon determining that the messaging request from the client 120 falls beyond the rate limit corresponding to the messaging account, the request from the provisioned messaging account for sending the message is not processed, and an error response is sent to the client 120 indicating that the request is exceeding the remaining message quota and the remaining throttling limit. The error response may be in form of a notification, a message, or a signal.
[0100] The reception module 308 may receive incoming RF signals, such as signals transmitted by the devices 110. The reception module 308 may downconvert the incoming RF signals to generate the IF or baseband signals which may be sent to the receiver processing circuitry. The reception module 308 may transmit the processed baseband signals to the processor 302 for further processing. The transceiver module 208 may receive analog or digital data from the processor 302 and may encode, multiplex, and / or digitize the outgoing baseband data to generate processed baseband or IF signals.
[0101] The memory 304 may store program instructions for performing several functions through which log management for upgradation of the server environment may be performed, by the processor 302. A part of the memory 304 may include non-volatile storage elements. Examples of non-volatile storage elements may include, but are not limited to, non-volatile or non-transitory computer-readable storage devices such as hard drives, magnetic tape, floppy diskettes, optical disks, Compact Disc Read-Only Memories (CD-ROMs), and magneto-optical disks, semiconductor memories, such as ROMs, RAMs, PROMs, EPROMs EEPROMs, flash memory, magnetic or optical cards, or other type ofmedia / machine-readable medium suitable for storing electronic instructions. The "non-transitory" computer-readable medium is not embodied in a carrier wave or a propagated signal. However, the term "non-transitory" should not be interpreted as the memory 304 is non-movable. In some examples, the memory 304 can be configured to store larger amounts of information. In certain examples, a non- transitory storage medium may store data that can, over time, change (e.g., in RAM or cache). The memory 304 can be an internal storage unit or it can be an external storage unit of the remote server 140, cloud storage, or any other type of external storage. In some embodiments, when the memory 304 is external to the remote server 140, the memory 304 may be removably attached to the remote server 140. Aspects of the present disclosure are intended to include or otherwise cover any data storage medium as “the memory 304”, without deviating from the scope of the present disclosure.
[0102] The database 308 is configured to store information of the plurality of rate limiting instances 142. In one embodiment, the information may further include a status information indicating a linked or non-linked status of each of the plurality of the rate limiting instances 142. The link status may indicate that the rate limiting instance is connected with the client 120 for at least one messaging account. The database 308 may be implemented as one or more of centralized database, RDBMS, Non-Relational Database Management System, Hierarchical Database Management System, Network Database Management System, an in-memory database including a distributed in-memory data storage, distributed database, or a distributed file system.
[0103] The communication interface 210 may manage communications with the network 130 and the client server 120. For example, the communication interface 208 may manage reception of the RPC call from the client 120, sending a response to the client 120, and transmission of messages to the target devices over the network 130. The communication interface 210 may include an electronic circuit specific to a standard that enables wired or wireless communication. Thecommunication interface 210 is configured for communicating with external devices via one or more networks.
[0104] Although FIG. 3 illustrates one example of remote server 140, various changes may be made to FIG. 3. For example, the remote server 140 may include any number of components in addition to the components shown in FIG. 3. Further, various components in FIG. 3 may be combined, further subdivided, or omitted and additional components may be added according to particular needs.
[0105] FIG. 4 illustrates an example environment 400 for managing messaging services and rate limit in the distributed network, in accordance with an embodiment of the present disclosure. The environment includes a client-server model where the client 120 and the remote server 140 are connected by the RPC mechanism. The devices 110 access the messenger service hosted on the client 120. The client 120 processes the requests for sending a message from the device 110 via the messenger instance and transmits the requests to the remote server 140. The requests are processed via the rate limiting instances 142 on the remote server 140.
[0106] As illustrated in FIG. 4, a first messenger instance 402-1 and a second messenger instance 402-2 act as the clients that send requests on behalf of the devices 110. The devices 110 access the messaging service via one or more of the first messenger instance 402-1 and the second messenger instance 402-2. The first messenger instance 402-1 and the second messenger instance 402-2 have a persistent RPC connection to the rate limiting instances operational in the remote server 140. It must be understood that the messaging service may comprise a plurality of messenger instances. However, for the sake of brevity and the example environment 400 shows two messenger instance, i.e. the first messenger instance 402-1 and the second messenger instance 402-2.
[0001] The FIG. 4 further illustrates a first Rate Limiting instance (RL-1) 404-1, a second Rate Limiting instance (RL-2) 404-2, and a third Rate Limiting instance (RL-3) 404-3 are remote server-side components. Each of the rate limiter instances RL-1 404-1, RL-2 404-2, RL-3 404-3 are configured to receive requests associatedwith the devices 110 from one or more of the first messenger instance 402-1 and the second messenger instance 402-2. It must be understood that there may be a plurality of rate limiting instances in the remote server 140 and any new number of rate limiting instances may be added in the remote server 140 without any configuration changes.
[0002] When the messaging account is provisioned, the messaging service module 210 included in the client 120 assigns a leader rate limiting instance corresponding to the messaging account. The leader rate limiting instance is assigned in a roundrobin fashion from the plurality of rate limiting instances 142. The messaging service module 210 further assigns one or more follower rate limiting instance corresponding to the messaging account. Assignment of the leader rate limiting instance and the one or more follower rate limiting instances for the corresponding messaging account ensures that all the requests for the given account are consistently managed by either the leader rate limiting instance and the available one or more follower rate limiting instances.
[0003] A particular leader rate limiting instance for one messaging account may serve as a follower rate limiting instance for another messaging account. A particular leader rate limiting instance may not know which messenger instance it is representing to as a leader. The information corresponding to the assigned leader rate limiting instance is only present with the first messenger instance 402-1 and the second messenger instance 402-2 of the messaging service.
[0004] For an example, for a first messaging account, the assigned leader rate limiting instance may be RL-1 404-1 and the one or more follower rate limiting instances maybe RL-2 404-2 and RL-3 404-3. Similarly for a second messaging account, the assigned leader rate limiting instance may be RL-2 404-2 and the one or more follower rate limiting instances maybe RL-1 404-1 and RL-3 404-3 and for a third messaging account, the assigned leader rate limiting instance may be RL-3 404-3 and the one or more follower rate limiting instances maybe RL-2 404-2 and RL-1 404-1.
[0005] Each of the messenger instances i.e. the first messenger instance 402-1 and the second messenger instance 404-2 stores the information corresponding to the assigned leader rate limiting instance and the one or more for lower rate limiting instances received from the remote server 140. One of the first messenger instance 402-1 and the second messenger instance 402-2 may receive a request for sending the message by the source device to the target user device. Upon receiving the request and based on the stored information, one of the first messenger instance 402- 1 and the second messenger instance 402-2 sends a request to the assigned leader rate limiter instance of the rate limiting instances RL-1 404-1, RL-2 404-2, RL-3 404-3 to determine the rate limit corresponding to the messaging account associated with the source device.
[0006] In one implementation, the first messenger instance 402- 1 receives a request for sending a message via the first messaging account by the source device. The first messenger instance 402-1 selects the assigned leader rate limiting instance RL-1 404-1 for sending a request to determine the rate limit corresponding to the first messaging account. For sending the request, the first messenger instance 402-1 determines the availability or non-availability of the leader rate limiting instance RL-1 404-1 for sending the message to the target user device. Along with the request, the messenger instance 402-1 sends the information corresponding to a maximum message quota and a throttling limit associated with the provisioned messaging account to the assigned leader rate limiting instance RL-1 404-1.
[0007] Upon receiving the request, the leader rate limiting instance RL-1 404-1 queries a local copy of synchronized rate limit data stored at a database 406 (same as database 150), to determine whether the request is within a remaining message quota of a maximum message quota and a count of remaining messages within the throttling limit of the corresponding messaging account. The rate limiting instances RL-1 404-1, RL-2 404-2, and RL-3 404-3 are connected to the database 406. The database 406 may be a centralized database.
[0008] If the request is within the remaining message quota and the remaining messages within the throttling limits, the request is processed. Based on the determination that the leader rate limiting instance RL-1 404-1 is available and operational, the message is sent to the target user device via the leader rate limiting instance RL-1 404-1. The remaining rate limit is updated by the leader rate limiting instance RL-1 404-1 periodically in the database 406 by a synchronization operation. Details corresponding to the synchronization operation are explained in greater detail further below.
[0009] However, based on the determination that the leader rate limiting instance RL-1 404-1 is not available, the first available follower rate limiting instance is identified based on determining an availability of the assigned one or more follower rate limiting instances in the order of assignment of the one or more follower rate limiting instances. In one implementation, the request for sending a message is automatically re-routed or re-directed by the first messenger instance 402-1 to the first available follower rate limiting instances among the one or more follower rate limiting instances RL-2 404-2 and RL-3 404-3. In another implementation, a new request for sending a message is sent by the first messenger service 402-1 to a first available follower rate limiting instances among the one or more follower rate limiting instances RL-2 404-2 and RL-3 404-3.
[0010] In one embodiment, the first available follower rate limiting instance among the assigned one or more follower rate limiting instances RL-2404-2 and RL-3 404- 3 is configured to receive a request for sending the message to the target user device by the first messenger instance. For an example, the first available follower rate limiting instance may be RL-2 404-2. Along with the request, the messenger instance 402-1 sends the information corresponding to a maximum message quota and a throttling limit associated with the provisioned messaging account to the one or more follower rate limiting instances RL-2 404-2 and RL-3 404-3.
[0011] The follower rate limiting instance may be RL-2 404-2 then processes the request and sends the message to the target device. The RL-2 404-2 then updatesthe remaining rate limit in the database 406 periodically by the synchronization operation, ensuring that the messaging service remains uninterrupted.
[0012] However, if the request is not within the remaining message quota and the pre-defined throttling limits, a response is sent back to the first messenger instance 404-1 via the first leader rate instance RL-1 404-1 or the first available follower rate limiting instance among assigned the one or more follower rate limiting instances RL-2 404-2 and RL-3 404-3, indicating that the request cannot be processed. The response may be the error response and may further include a cause for failure in sending the message such as an exceeding quota limit. If the request exceeds the limits, the RL-1 sends the throttling response back to the messenger 1, indicating that the request is denied due to quota limitations.
[0013] The rate limiting instances RL-1 404-1, RL-2 404-2, and RL-3 404-3 are connected to the database 406. The rate limiting instances RL-1 404-1, RL-2 404- 2, and RL-3 404-3 are further configured to perform the synchronization operation with the database 406. The synchronization operation may either be performed periodically or upon a trigger. Through the synchronization operation, the rate limiting instances RL-1 404-1, RL-2 404-2, and RL-3 404-3 periodically updates the database 406 with data related to a change in the remaining message quota and the count of messages remaining within the pre-defined throttling limits corresponding to the first messaging account. For an example, the RL-1 404-1 synchronizes the updated quota data with the database 406.
[0014] The rate limiting instances may be handling messaging requests from a large number of messaging accounts. Each of the rate limiting instances RL-1 404-1, RL- 2 404-2, and RL-3 404-3 associated with a specific messaging account, for an example, the first messaging account, persist the data where there has been changes in the remaining message quota and the count of messages remaining within the throttling limit corresponding to the messaging account. Further, only the data corresponding to the messaging accounts that have not been synchronized in a previous synchronization operation is persisted in the database 406.
[0015] In an embodiment, upon receiving the request for sending the message to the target device for a new provisioned messaging account, each of the rate limiting instances RL-1 404-1, RL-2 404-2, and RL-3 404-3 associated with the first messaging account may fetch data from the database 406. The data corresponding to the messaging account may include the remaining rate limit of the messaging account.
[0016] In another embodiment, discrepancy in value of the remaining rate limit for the messaging account during a time lag between change in the value of remaining rate limit associated with the messaging account and updating the database 406 is avoided as the messaging request corresponding to the same messaging account is received and processed at the same assigned first leader rate instance RL-1 404-1 or the assigned the one or more follower rate limiting instances RL-2 404-2 and RL-3 404-3.
[0017] Thus, through the synchronization operation, the data corresponding to the remaining rate limit associated with the messaging account is consistently shared between the database 406 and the rate limiting instances RL-1 404-1, RL-2 404-2, and RL-3 404-3. Thereby, it is ensured that every rate limiting instance in the environment 400 has a most recent quota information for every messaging account, enabling consistent rate limiting across the distributed environment 400.
[0107] FIG. 5 illustrates a flowchart depicting a method 500 for managing messaging services in the distributed network environment, in accordance with an embodiment of the present disclosure. The method 500 is implemented at the client 120. Although method 500 shows example blocks of steps 502 to 512, in some embodiments, the method 500 may include additional steps, fewer steps or steps in different order than those depicted in FIG. 5. In other embodiments, the steps 502- 512 may be combined or may be performed in parallel.
[0108] At step 502, the messaging service model 210 is configured to receive from the source devices of the devices 110, a first request for provisioning a messaging account associated with the source device. To provision a newmessaging account, the messaging service model 210 may fetch information corresponding to the source device associated with the messaging account from a local database of the client 120.
[0109] At step 504, upon provisioning the messaging account, the messaging service model 210 is configured to assign a leader rate limiting instance and one or more follower rate limiting instances from the plurality of rate limiting instances 142 corresponding to the messaging account. The leader rate limiting instance is assigned from the plurality of rate limiting instances 142 in a round robin manner based on the information of the plurality of rate limiting instances 142. Barring the leader rate limiting instance, other remaining rate limiting instances from the plurality of rate limiting instances 142 are assigned the one or more follower rate limiting instances corresponding to the messaging account.
[0110] At step 506, once the assignment of the leader rate limiting instance and the one or more follower rate limiting instance is completed, the messaging service model 210 is configured to initiate establishment of a connection with at least the leader rate limiting instance and the one or more follower rate limiting instances for each account established via the RPC mechanism.
[0111] At step 508, upon establishment of the connection, the messaging service module 210 is configured to transmit to the plurality of rate limiting instances, an information corresponding to the maximum message quota and the throttling limit associated with the provisioned messaging account.
[0112] At step 510, the messaging service module 210 is configured to receive, using the transceiver module 208, from the source devices, a second request for sending a message to one or more target devices of the plurality of devices corresponding to the messaging account.
[0113] At step 512, the messaging service model 210 is configured to transmit, using the transceiver module 208, the request for sending the message to the one or more target devices to one of the first rate limiting instance or the one ormore second rate limiting instances. For transmitting the request, the messaging service model 210 determines an availability or non-availability of the first rate limiting instance. Based on the availability of the first rate limiting instance, the request is then processed by the first available rate limiting instance from the one or more second rate limiting instances. Based on the non-availability of the first rate limiting instance, the messaging service model 210 determines an availability or non-availability of the one or more second rate limiting instances.
[0114] The leader rate limiting instance or the one or more follower rate limiting instances where the request is received may fetch data related to the remaining message quota and remaining messages withing the throttling limit corresponding to the new messaging account provisioned from the database 150. The fetched data may be compared with the maximum message quota and the throttling limits applicable on the request received from the messaging service module 210 to determine whether the request can be processed. The request is then processed by the first available rate limiting instance from the one or more second rate limiting instances.
[0115] FIG. 6 illustrates a flowchart depicting a method 600 for managing messaging rate limit in the distributed network environment, in accordance with an embodiment of the present disclosure. The method 600 is implemented at the remote server 140. Although method 600 shows example blocks of steps 602 to 606, in some embodiments, the method 600 may include additional steps, fewer steps or steps in different order than those depicted in FIG. 6. In other embodiments, the steps 602-606 may be combined or may be performed in parallel.
[0116] At step 602, upon assignment of the first rate limiting instance and the one or more second rate limiting instances corresponding to the provisioned messaging account, the rate limiting module 306 is configured to receive the request from the client 120 for sending the message to target devices of the devices 110 corresponding to the provisioned messaging account. The request is received at oneof the first rate limiting instance or one or more of second rate limiting instances included in the rate limiting module 306.
[0117] At step 604, in response to receiving the request, the rate limiting module 306 is configured to determine via the leader rate limiting instance or the one or more of follower rate limiting instances where the request is received, whether the request is within a remaining message quota of a maximum message quota and the count of remaining messages within the throttling limit of the corresponding messaging account. For determining that the request is exceeding the maximum message quota and the count of remaining messages within the throttling limit, the leader rate limiting instance or the one or more of follower rate limiting instances may fetch data corresponding to rate limits from the database 150. The fetched data may be compared with the maximum message quota and the throttling limits applicable on the request received from the messaging service module 210 to determine whether the request can be processed.
[0118] If it is determined that the request is exceeding the maximum message quota and the count of remaining messages within the throttling limit, the rate limiting module 306 sends an error response to the client 120, indicating that the request is denied due to the rate limit. The rate limiting module 306 does not perform any further operation.
[0119] At step 606, upon the determination that the request is within the remaining message quota and the remaining messages within the throttling limits, the rate limiting module 306 via the leader rate limiting instance or the one or more of follower rate limiting instances where the request is received, sends the message to the target device.
[0120] In an embodiment, the request is received at the leader rate limiting instance when the leader rate limiting instance is found to be operational and available for sending the message to the target device. The request completed by the leader rate limiting instance and the message is delivered to the target user device. The leader rate limiting instance also updates the database 150 through thesynchronization operation with values of the remaining message quota and the count of messages remaining within the throttling limit after processing the request and delivering the message.
[0121] However, based on the determination that the leader rate limiting instance is not available, the request is received at a first available follower rate limiting instance among the assigned follower rate limiting instances that is available and operational. Corresponding to the request, the follower rate limiting instances may be checked for their availability in an order of the assignment of the follower rate limiting instances.
[0122] Thereupon, the request for sending the message to the target user device is received at the first available follower rate limiting instance among assigned the one or more follower rate limiting instances. Based on the request, the message is delivered to the target user device via the first available follower rate limiting instance. The first available follower rate limiting instance also updates the database 150 through the synchronization operation with values of the remaining message quota and the count of messages remaining within the throttling limit after processing the fifth request and delivering the message.
[0123] Now, referring to the technical abilities and advantageous effect of the present disclosure, operational advantages that may be provided by one or more embodiments of the system and the method for distributed rate limiting for messaging services includes reduction in processing overhead. As information corresponding to assignment of the leader rate limiting instance and the one or more follower rate limiting instances is not stored at the remote server, thus additional processing at the remote server is reduced.
[0124] Another advantage offered by the disclosed system and the method is maintaining continuous messaging services for user by ensuring efficient quota and throttling management. The system and the method utilize a leader-follower architecture enabling higher throughput compared to the traditional distributed rate limiters. Yet another noteworthy advantage provided by the one or moreembodiments may include, but not limited thereto, that a responsibility of maintaining the leader and the follower rate limiting instances information is shifted to a messaging request sending application, thereby simplifying implementation of the system and reducing unnecessary request redirections.
[0125] Further, another advantage offered by the disclosed system and the method is an even distribution of the messaging accounts by utilizing a round-robin selection of the leader rate limiter instances. The disclosed system and the method further facilitate scalability for distributed rate limiting for messaging services without overwhelming any single rate limiter instance. Furthermore, another advantage offered by the disclosed system and the method is an efficient fault handling mechanism. In case of failure of the leader rate limiting instance, the messaging requests are seamlessly redirected to the follower instances, ensuring an availability of continuous messaging service to a user without disruptions.
[0126] Additionally, periodic synchronization and messaging requests for the messaging account being handled by the same assigned leader and follower rate limiting instances offers reduction in synchronization overhead and data inconsistency of the data transferred to and from the database within the server infrastructure, further enhancing the efficiency of the rate limiting process. The system and the method ensure consistent management of the messaging quotas and optimization of throttling of the messaging requests in a distributed environment, thereby ensuring reliable availability of the messaging services.
[0127] Embodiments of the present technology may be described herein with reference to flowchart illustrations of methods and systems according to embodiments of the technology, and / or procedures, algorithms, steps, operations, formulae, or other computational depictions, which may also be implemented as computer program products for managing messaging services in the distributed network environment and for managing messaging rate limits in the distributed network environment separately or in combination. In this regard, each block or step of the flowchart, and combinations of blocks (and / or steps) in the flowchart, as wellas any procedure, algorithm, step, operation, formula, or computational depiction can be implemented by various means, such as hardware, firmware, and / or software including one or more computer program instructions embodied in computer- readable program code. As will be appreciated, any such computer program instructions may be executed by one or more computer processors, including without limitation a general -purpose computer or special purpose computer, or other programmable processing apparatus to perform a group of operations comprising the operations or blocks described in connection with the disclosed methods.
[0128] Further, these computer program instructions for managing messaging services in the distributed network environment, such as embodied in computer-readable program code, may also be stored in one or more computer- readable memory or memory devices (for example, the memory 204), and computer program instructions for managing messaging rate limits in the distributed network environment such as embodied in computer-readable program code, may also be stored in one or more computer-readable memory or memory devices (for example, the memory 304) that can direct a computer processor or other programmable processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory or memory devices produce an article of manufacture including instruction means which implement the function specified in the block(s) of the flowchart(s).
[0129] It will further be appreciated that the term “computer program instructions” as used herein refer to one or more instructions that can be executed by the one or more processors (for example, the processor 202 and the processor 302) together or separatley to perform one or more functions as described herein. The instructions may also be stored remotely such as on a server, or all or a portion of the instructions can be stored locally and remotely.
[0130] Those skilled in the art will appreciate that the methodology described herein in the present disclosure may be carried out in other specific ways than those set forth herein in the above disclosed embodiments without departingfrom essential characteristics and features of the present invention. The abovedescribed embodiments are therefore to be construed in all aspects as illustrative and not restrictive.
[0131] The drawings and the forgoing description give examples of embodiments. Those skilled in the art will appreciate that one or more of the described elements may well be combined into a single functional element. Alternatively, certain elements may be split into multiple functional elements. Elements from one embodiment may be added to another embodiment. For example, orders of processes described herein may be changed and are not limited to the manner described herein. Any combination of the above features and functionalities may be used in accordance with one or more embodiments.
[0132] In the present disclosure, each of the embodiments has been described with reference to numerous specific details which may vary from embodiment to embodiment. The foregoing description of the specific embodiments disclosed herein may reveal the general nature of the embodiments herein that others may, by applying current knowledge, readily modify and / or adapt for various applications such specific embodiments without departing from the generic concept, and, therefore, such adaptations and modifications are intended to be comprehended within the meaning of the disclosed embodiments. It is to be understood that the phraseology or terminology employed herein is for the purpose of description and is not limited in scope.LIST OF REFERENCE NUMERALS
[0133] The following list is provided for convenience and in support of the drawing figures and as part of the text of the specification, which describe innovations by reference to multiple items. Items not listed here may nonetheless be part of a given embodiment. For better legibility of the text, a given reference number is recited near some, but not all, recitations of the referenced item in the text. The same reference number may be used with reference to different examples or different instances of a given item. The list of reference numerals is:100 - example system for managing messaging services and rate limit in a distributed network environment110 - Plurality of devices120 - Messaging system122 - Processor124 - Memory126 - Messaging service130 - Network140 - Rate Limiting system142 - Rate limiter142-1 to 142-n - Rate limiting instances150 - Database200 - Block diagram depicting a detailed system architecture of a client202- Processor204 - Memory206 - Interface208 - Transceiver module210 - Messaging service module212 - Communication Interface214 - Communication Bus300 - Block diagram depicting a detailed system architecture of a remote server302- Processor304 - Memory306 - Rate limiting module308 - Reception module310 - Communication Interface312 - Database314 - Communication Bus400 - Example environment for managing messaging services and rate limit in the distributed network402-1 - Messaging Instance 1402-2 - Messaging Instance 2404-1 - Rate limiting Instance 1404-2 - Rate limiting Instance 2 404-3 - Rate limiting Instance 3406 - Database500- Flowchart for managing messaging services in a distributed network environment502-512 - Operation steps of the method 500 600- Flowchart for managing messaging rate limit in a distributed network environment602-606 - Operation steps of the method 600
Claims
WE CLAIM:
1. A method (500) for managing messaging services in a distributed network environment, the method (500) comprising: assigning, by a messaging service module (306), a first rate limiting instance and one or more second rate limiting instances from a plurality of rate limiting instances (142) corresponding to a messaging account provisioned with the messaging service module (306); initiating, by the messaging service module (306), establishment of a connection with at least one of the first rate limiting instance and the one or more second rate limiting instances among the plurality of rate limiting instances (1 2); transmitting, by the messaging service module (306) using a transceiver module (208), information corresponding to a maximum message quota and a throttling limit associated with the provisioned messaging account, to the plurality of rate limiting instances (142) upon establishment of the connection; receiving, by the messaging service module (306) using the transceiver module (208), a request from a source device of a plurality of devices (110) for sending a message to one or more target devices of the plurality of devices (110) corresponding to the messaging account; and transmitting, by the transceiver module (208), the request for sending the message to the one or more target devices to one of the first rate limiting instance or the one or more second rate limiting instances.
2. The method (500) as claimed in claim 1, wherein for transmitting the request for sending the message, the method (500) comprises: determining, by the messaging service module (306) via the established connection, an availability or non-availability of the first rate limiting instance for sending the message to the one or more target devices of the plurality of devices (no); performing, by the messaging service module (306), one of:transmitting, based on the determination that the first rate limiting instance is available, the request for sending the message to the first rate limiting instance; and transmitting, based on the determination that the first rate limiting instance is not available, the request for sending the message to an available rate limiting instance among the one or more second rate limiting instances.
3. The method (500) as claimed in claim 2, wherein the available rate limiting instance is identified based on determining an availability of the assigned one or more second rate limiting instances in an order of the assigned one or more second rate limiting instances.
4. The method (500) as claimed in claim 1, wherein for assigning the first rate limiting instance and one or more second rate limiting instances, the method (500) comprises receiving, by the transceiver module (208), a request for provisioning the messaging account associated with the source device.
5. The method (500) as claimed in claim 1, wherein: the plurality of rate limiting instances (1 2) are generated at a rate limiting system (140), and the first rate limiting instance is assigned from the plurality of rate limiting instances (142) in a round robin manner.
6. A method (600) for managing messaging rate limit in a distributed network environment, the method (600) comprising: receiving, at a rate limiting module (306) via a reception module (308), a request from a messaging system (120) for sending a message to one or more target devices of a plurality of devices (110) corresponding to a provisioned messaging account, wherein the request is received at one of a first rate limiting instance or one or more of second rate limiting instances included in the rate limiting module (306); determining, by the rate limiting module (306) in response to receiving the request via one of the first rate limiting instance or one or more of the second ratelimiting instances, whether the request is within each of a remaining message quota of a maximum message quota and a count of remaining messages within a throttling limit of the provisioned messaging account; and sending, by the rate limiting module (306) via one of the first rate limiting5 instance or one or more of the second rate limiting instances, the message to the one or more target devices upon the determination that the request is within each of the remaining message quota and the count of remaining messages.
7. The method (600) as claimed in claim 6, wherein the request is received at one of the first rate limiting instance or one or more of the second rate limiting instances10 based on an assignment of one of the first rate limiting instance or one or more of the second rate limiting instances from the plurality of rate limiting instances (142) associated with the messaging account.
8. The method (600) as claimed in claim 6, for sending the message to the one or more target devices, the method (600) comprises:15 receiving, by the rate limiting module (306) via the first rate limiting instance, the request for sending the message to the one or more target devices based on an availability of the first rate limiting instance; and determining, by the rate limiting module (306) via the first rate limiting instance, whether the request is within each of the remaining message quota and the 20 count of remaining messages; and sending, by the rate limiting module (306) via the first rate limiting instance, the message to the one or more target devices upon the determination that the request is within each of the remaining message quota and the count of remaining messages.
259. The method (600) as claimed in claim 6, for sending the message to the one or more target devices, the method (600) comprises: receiving, by the rate limiting module (306) via a first available rate limiting instance among the one or more second rate limiting instances, the request for sending the message to the one or more target devices based on a non-availabilitydetermining, by the rate limiting module (306) via the first available rate limiting instance among the one or more second rate limiting instances, whether the request is within each of the remaining message quota and the count of remaining messages; and sending, by the rate limiting module (306) via the first available rate limiting instance among the one or more second rate limiting instances, the message to the one or more target devices upon the determination that the request is within each of the remaining message quota and the count of remaining messages.
10. The method (600) as claimed in claim 6, the method (600) comprising periodically performing a synchronization operation, by the rate limiting module (306) via at least one of the first rate limiting instance and the one or more second rate limiting instances, for one or more of updating, in a database, data related to a change in the remaining message quota and the count of remaining messages corresponding to the messaging account; and fetching, from the database, data related to the remaining message quota and the count of remaining messages corresponding to the messaging account.
11. A messaging system (120) for managing messaging services in a distributed network environment, the messaging system (120) comprising: a messaging service module (306) configured to: assign by a first rate limiting instance and one or more second rate limiting instances from a plurality of rate limiting instances (142) corresponding to a messaging account provisioned with the messaging service module (306); and initiate establishment of a connection with at least one of the first rate limiting instance and the one or more second rate limiting instances among the plurality of rate limiting instances (142); and a transceiver module (208) configured to: transmit information corresponding to a maximum message quota and a throttling limit associated with the provisioned messaging account, tothe plurality of rate limiting instances (142) upon establishment of the connection; receive a request from a source device of a plurality of devices (110) for sending a message to one or more target devices of the plurality of devices (110) corresponding to the messaging account; and transmit the request for sending the message to the one or more target devices to one of the first rate limiting instance or the one or more second rate limiting instances.
12. The messaging system (120) as claimed in claim 11, wherein for transmitting the request for sending the message, the messaging service module (306) is configured to: determine, by the messaging service module (306) via the established connection, an availability or non-availability of the first rate limiting instance for sending the message to the one or more target devices of the plurality of devices (110); perform, by the messaging service module (306), one of: transmit, based on the determination that the first rate limiting instance is available, the request for sending the message to the first rate limiting instance; and transmit, based on the determination that the first rate limiting instance is not available, the request for sending the message to an available rate limiting instance among the one or more second rate limiting instances.
13. The messaging system (120) as claimed in claim 12, wherein the available rate limiting instance is identified based on determining an availability of the assigned one or more second rate limiting instances in an order of the assigned one or more follower rate limiting instances.
14. The messaging system (120) as claimed in claim 11, wherein for assigning the first rate limiting instance and one or more second rate limiting instances, the transceiver module (208) is configured to receive a request for provisioning the messaging account associated with the source device.
15. The messaging system (120) as claimed in claim 11, wherein: the plurality of rate limiting instances (142) are generated at a rate limiting system (140), and the first rate limiting instance is assigned from the plurality of rate limiting 5 instances (142) in a round robin manner.
16. A rate limiting system (140) for managing messaging rate limit in a distributed network environment, the rate limiting system (140) comprising: a rate limiting module (306); and a reception module (308) configured to:10 receive, at a rate limiting module (306), a request from a messaging system (120) for sending a message to a one or more target devices of a plurality of devices (110) corresponding to a provisioned messaging account, wherein the request is received at one of a first rate limiting instance or one or more of second rate limiting instances included in the rate limiting15 module (306), wherein the rate limiting module (306) is configured to: determine, in response to receiving the request via one of the first rate limiting instance or one or more of the second rate limiting instances, whether the request is within each of a remaining message quota of a maximum message quota and a count of remaining messages within a20 throttling limit of the provisioned messaging account; and send, via one of the first rate limiting instance or one or more of the second rate limiting instances, the message to the one or more target devices upon the determination that the request is within each of the remaining message quota and the count of remaining messages.2517. The rate limiting system (140) as claimed in claim 16, wherein the request is received at one of the first rate limiting instance or one or more of the second rate limiting instances based on an assignment of one of the first rate limiting instance or one or more of the second rate limiting instances from the plurality of rate limiting instances (142) associated with the messaging account.
18. The rate limiting system (140) as claimed in claim 16, for sending the message to the one or more target devices, the rate limiting module (306) is configured to: receive, via the first rate limiting instance, the request for sending the message to the one or more target devices based on an availability of the first rate limiting instance; determine, via the first rate limiting instance, whether the request is within each of the remaining message quota and the count of remaining messages; and send, via the first rate limiting instance, the message to the one or more target devices upon the determination that the request is within each of the remaining message quota and the count of remaining messages.
19. The rate limiting system (140) as claimed in claim 16, for sending the message to the one or more target devices, the rate limiting module (306) is configured to: receive, via the first available rate limiting instance among the one or more second rate limiting instances, the request for sending the message to the one or more target devices based on a non-availability of the first rate limiting instance; and determine, via the first available rate limiting instance among the one or more second rate limiting instances, whether the request is within each of the remaining message quota and the count of remaining messages; and send, via the first available rate limiting instance among the one or more second rate limiting instances, the message to the one or more target devices upon the determination that the request is within each of the remaining message quota and the count of remaining messages.
20. The rate limiting system (140) as claimed in claim 16, the rate limiting module (306) is configured to periodically perform a synchronization operation, via at least one of the first rate limiting instance and the one or more second rate limiting instances, for one or more of: update, in a database, data related to a change in the remaining message quota and the count of remaining messages corresponding to the messaging account; andfetch, from the database, data related to the remaining message quota and the count of remaining messages corresponding to the messaging account.
21. A computer program product for managing messaging services in a distributed network environment, the computer program product comprising computer- executable instructions that are stored on a non-transitory computer-readable medium and that, when executed by at least one processor performs operations comprising: assigning a first rate limiting instance and one or more second rate limiting instances from a plurality of rate limiting instances corresponding to a provisioned messaging account; initiating establishment of a connection with at least one of the first rate limiting instance and the one or more second rate limiting instances among the plurality of rate limiting instances; transmitting information corresponding to a maximum message quota and a throttling limit associated with the provisioned messaging account, to the plurality of rate limiting instances upon establishment of the connection; receiving a request from a source device of a plurality of devices for sending a message to one or more target devices of the plurality of devices corresponding to the messaging account; and transmitting the request for sending the message to the one or more target devices to one of the first rate limiting instance or the one or more second rate limiting instances.
Citation Information
Patent Citations
Centralized throttling service
US20160328573A1
Distributed Rate Limiting
US20170180414A1
Dynamic throttling systems and services
US9729557B1