turklooki.blogg.se

Design tinyurl geeksforgeeks
Design tinyurl geeksforgeeks












design tinyurl geeksforgeeks

URL being generated through our service should not be predictable (human guessable).Now there are few non functional requirements which every new service should take care, in our case following should be non functional requirements which are the main area of focus for any interviewer: So above i have listed all the functional requirements. Users should be able to specify the expiration time. Links will expire after a standard default timespan.When user will try to access the short link, our service should redirect them to the original link.The short link should be short enough to be easily copied and pasted in various applications. When user pass a long URL, our service should generate a unique short URL for it.So here are the list of requirements i will take care of in this blog : You need to ask as many questions from the interview to clarify the problem requirements which you need to take care in your design, no interviewer will give you the list right away, you need to ask questions like for this problem statement you can ask the following question :ĭo I need to take care of link expiration and can user pass the custom expiration time? URL shortening is used to create shorter links for long URLs and and when user hits the short links they will be redirected to the original URL.įor example if we shorten this page URL through tinyurl : So before finding answer to these questions, let us see what is URL shortening : If you are able to answer all the these questions then believe me no interviewer can reject you. How do you plan to establish monitoring and alerting for your service.Where do you need to put the load balancer.Figure out how will your service scale with load.Firstly do a capacity estimation(for traffic, disk usage, bandwidth and memory).There are few areas which you need to focus on for the design question :

design tinyurl geeksforgeeks

When you are asked a design question in an interview, interviewer is not looking for the solution right away, he wants to see how do you approach the problem. So the problem statement is extremely simple that is when user gives you a long URL you need to return a unique short URL and when users gives you the short URL you need to return the original long URL.ĭesign questions are extremely subjective in nature, so take your time, think about the problem and come up with your own solution This is my first blog and i take this topic because this is extremely popular interview question.














Design tinyurl geeksforgeeks