Home
Blog
Projects
About

From Azure Blues to DigitalOcean Bliss

Sunday, 12 May 2024

Project Overview

Today we’re going to talk about a perfect example that illustrates the classic trade-off between managed services and DIY solutions.

I'm a developer who made my portfolio from scratch and was looking for a place to host my website, and like many, I initially opted for the convenience of a managed cloud platform. Azure seemed like a perfect fit because of it’s integration with Visual Studio (my current choice of IDE), but after just five days, the bill came as a shock – it was almost 6x what I expected! This sparked a quest for a more cost-effective solution. I have a friend who is currently a Web Developer and he told me about DigitalOcean, so I decided to explore it as an option.

Azure's managed services offered ease of use, but the cost quickly became unsustainable for my project. DigitalOcean offered a more budget-friendly option, but it required a hands-on approach.

Here's a brief overview of what I did to get my website on DigitalOcean:

  • Droplet and Database Creation: I went on DigitalOcean, created an account and created a Droplet, a virtual machine which runs Ubuntu. I also opted to buy an instanced Database which I can split as necessary, which I did to include the 2 databases I needed for my portfolio.
  • Virtual Ubuntu Machine: I set up a virtual Ubuntu machine on DigitalOcean, giving me full control over the server environment.
  • .NET Installation: I had to manually install the .NET runtime so that I can actually run my project.
  • Git File Management: I set up my repo inside the virtual machine so that I can pull my changes from my local computer to it so I can update it whenever I want with ease.
  • Project Deployment: I deployed my project directly onto the virtual machine.
  • Process Management: I used pm2, a process manager, to keep my application running smoothly.
  • SSL Certificate: To secure my website, I obtained an SSL certificate using Certbot.

Results & Impact:

The initial setup on DigitalOcean was definitely more involved than Azure's managed approach. However, the cost savings were immediate – I cut my hosting bill by a factor of 6! More importantly, this hands-on experience gave me a valuable understanding of the underlying infrastructure powering my game.

Conclusion:

Moving from Azure to DigitalOcean wasn't without its challenges, I had to figure out how to change the connection string DigitalOcean gave me to be in the appropriate format for my application, but overall I’d say the process went very smooth and I’d recommend it to anyone who is looking to host their non-static site somewhere! The cost savings and newfound knowledge were well worth it. As it stands right now, I’m paying about $20 a month for this portfolio to be hosted, but that includes the $15/mo Instanced Database. I opted to use this because I can partition it as many times as I want for future projects that I want to test out that might need a database.

Digital Ocean also offers a $200 credit for new users, so I’m not even paying anything out of pocket for the next 10 months! They have a referral program so if you want to use my referral and get your $200 credit, click the badge below!

DigitalOcean Referral Badge

This experience solidified the importance of understanding your infrastructure, even if it means getting your hands dirty sometimes. Feel free to leave a comment below if you have any questions about migrating from managed services or self-hosting on DigitalOcean!

An unhandled error has occurred. Reload 🗙