The user identifier is then used to determine whether the user is a free user or a premium user. Here, the userToken is returned by the logon API and is used to get the user identifier. This API takes a big URL and an optional expiration time as an input, and then creates and returns a unique short URL. So, there will be following two APIs that our service will provide:ĬreateShortURL (userToken, bigURL, optional expirationTime) There are two operations that we are performing: one creating a short URL for a big URL and second retrieving a big URL from the short URL. Now, Let's discuss the other set of APIs that are related directly to our service functionality. The service will use an external Identity Provider, such as Facebook or Google (i.e., the user can use his Facebook or Google account to login to the service). We might add a separate chapter on designing the Identity and Access Management System to discuss these APIs in the future. □ We will not discuss how the user logon/logoff APIs work in this chapter. This API returns the user token after authenticating the user. The first set of APIs is related to user logon/logoff. The service will support the following set of APIs. These requirements will dictate how we are going to design our service. We are restricting the functional and non-functional requirements to only the above set, although there can be more requirements. similarly, the service cannot have minimal latencies if it is not scalable with increasing load.the service cannot be highly available if it is not fault-tolerant.Of course, some of the non-functional requirements are somewhat related. So, once a short URL has been created, it should be present in the system during its lifetime (i.e., before its expiration time). At the same time, we also want data to be durable. The service has strong consistency in the sense that once we created and returned a short URL to the user, if the user queries the big URL using that short URL, the service should be able to return the big URL.ħ. Minimum cost possible - it dictates that the system should start with few servers to minimize the cost but should be elastic enough to scale with increasing user load.Ħ. The service is scalable with increasing load.ĥ. maybe in the order of a few milliseconds (e.g., up to 500 msec at most)Ĥ.The read and write operations (i.e., creating short URLs from big URLs and redirecting users to big URLs from short URLs) should occur with minimal latencies. What it means that, in case of faults and/or failures, the service should still be available to serve the usersģ.The service should be highly available (e.g., having 99.999% or five 9s).Ģ. This requires having an analytics and monitoring component.ġ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |