HubSpot interview question

Design a url shortener, handle a few potential performance problems.