![]() In addition, the size of the recording server pool can easily be scaled up and down in real-time based on load. The pool of stateless recording services allows upstream services to retry failed requests on other instances of the recording service. For example, when you make a recording using the verb in TwiML, the work of post-processing the recording to improve the audio quality and upload it to persistent storage is provided by a pool of recording servers. Twilio’s infrastructure contains many service pools that implement parts of our voice and SMS APIs. Separate business logic into small stateless services that can be organized in simple homogeneous pools. There’s a lot to this topic, we’ll make a point of covering it in much more detail in the future. (See #2 above) For example, if a service provides the capability to add money to a user’s account, an idempotent interface to that service allows failed request to that service to be safely retried. If the API of a dependent service is idempotent, that means it is safe to retry failed requests. "In computer science, the term idempotent is used more comprehensively to describe an operation that will produce the same results if executed once or multiple times." If you aren’t familiar with the concept, go read up on the wonderful world of idempotency. Idempotent service interfacesīuild services that allow requests to be safely retried. If you don’t fail fast and retry, distributed systems, especially those that are process or thread-based, can lock up as resources are consumed waiting on slow or dead services.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |