How To Build a URL Shortener With .NET and SQL Server

preview_player
Показать описание

Do you know how to build a URL Shortener? It's a system that can take in a long URL and return a unique short URL in the response. When you navigate the short URL, the URL Shortener system should redirect you to the original long URL. This is a common system design interview question.

Join my weekly .NET newsletter:

Read my Blog here:

Subscribe for more:

Chapters
0:00 Creating the "shorten" API endpoint
4:20 Adding the short URL code generation service
11:07 Completing the "shorten" endpoint implementation
16:08 Adding the "redirect" endpoint using a Shortened URL
18:25 How to scale the URL Shortener
Рекомендации по теме
Комментарии
Автор

Yes, more system design videos like this would be great, because you not only discussed the ideas, but implemented it! Thanks!

jmiltons
Автор

Teaching software systems design by implementing them is a great idea.

RezaAsghari-wf
Автор

Yeah. Really good video. And you showed all code from start to finish. I love nick chapsas channel too, but so many of his videos say 'i just did this or that, and wired up this beforehand', so we cant see all the code and follow along.

Excellent touch to add the section at the end where you mention the possible improvements. 10/10 video.

daraghodonoghue_
Автор

You forgot to mention that strings in SQL Server are case-insensitive. In this case, the "xyz" string would be equal to "XYZ". You can fix this by using different collations.

flextry
Автор

I enjoyed the system design aspect of this video. I definitely think a series of system design videos would be great!

pedrosilva
Автор

Thanks for making this video. Please make more similar complete tutorial videos. ❤

AslamNazeerShaikh
Автор

I have been working with C# since past 1.5 years and I am not sure if I will be able to build something like this in near future 😭😭. Thanks for the video, this is quality content.

noahg
Автор

_random.Next(Alphabet.Length - 1) is wrong. To quote from the docs, Next(Int32) returns a non-negative random integer that is less than the specified maximum. You're existing code will always omit the last character

aihopeful
Автор

Yes these videos are very clear and concise. Defo more sys design videos please! Great work!

ferdeen
Автор

Thanks for another great video Milan!
Additionally, I implemented a background service which generates a batch of codes and stores them in the database. When the amount of "available" codes (I use a flag) reaches 10, it starts generating a batch again. Works like a charm!

jamesroot
Автор

Best part are suggestions for performance optimizations. That is making huge distinction among million of similar videos/articles. Most less experienced developers can kind about complex topics like performance optimization, scaling in/out and also when to actually do it in whole development and production life cycle.

zokocx
Автор

Really nice showcase video. These are really fun to watch, keep them coming!

yunietpiloto
Автор

Awesome as always! Definately would love such more system design videos. How about a video on Single Signon with openiddict or ID4?

bilalmehrban
Автор

Very enjoyable watch Milan! More of these

Eamo-
Автор

Excelent content! Looking forward to more content like this.

rezendemarcio
Автор

Your videos are very clear and to the point. I way prefer your videos to the others out there (eg Amichai, Nick).

alan-
Автор

You have already done few videos about different types of architeture: clean architecture, vertical slice. Maybe it's time to do a video about onion architecture and compare to clean, and a layered architecture that is done in a correct way. Also you can make about EF Core Extensions library, it has as free as payed features. I have personally used this library for bulk operations with a great success. Maybe this library can sponsore your video 😊

antonmartyniuk
Автор

Yes More system design videos, like Twitter, Parking Lot & Elevator please!

amitd
Автор

Loved it! Finished your pragmatic clean architecture, will your new tutorial include these tips you are sharing in YouTube. It would be better to have them to wrap up.

E_G_
Автор

Great video Milan! Maybe this could become a series, system design practices etc. Maybe you can implement a simple image optimaztion service that transforms .png files to .webp? I dont know the complexity of the idea or it is applicable.

cemustun
visit shbcf.ru