Choosing Digital Ocean for Hosting
We often try to balance our need to provide services at the lowest cost possible while not suffering the quality that often comes with budget options. Microsoft and AWS provide advanced services, but this comes at a premium. For freelancers, or businesses starting out, Digital Ocean (DO) is a great option. It definitely is not perfect, and still has a lot of room to grow. One downside to budget options is that the SLA's aren't as good as bigger providers.
You can use my referral link if you'd like to use a $200 credit to experiment with DO.
I will go through my experiences with the different Digital Ocean features.
Support
Digital Ocean has an incredible respository of documents. I've been able to find the information I needed for components I'm using. They even have guides for doing some complicated tasks regardless of the platform. This is an example of a Django, Nginx, and Gunicorn implementation guide.
Droplets
First of all, if you're looking for dirt cheap virtual servers, then Digital Ocean may not be the best option. You can look at the Liquid Web for slightly cheaper VPS servers and good hosting.
With that out of the way. Droplets are linux virtual servers that can come pre-loaded with 232 applications such as Docker, WordPress, and cPanel. You can even create custom images that can be used in droplet creation. They range from $4 to $2,096 depending on the hardware to capacity. They are also used as nodes in Kubernetes pools.
They come with a 99.99% monthly SLA with service credit for time past the SLA. This won't come near what is possible with AWS and Azure, but if your app doesn't require 6 9s, then you'll be okay.
Kubernetes
I've been using Kubernetes (k8s) to manage applications I'm utilizing and developing. The Digital Ocean interface allows you to manage your pools, which consists of droplets as nodes. The pricing starts at $12/mo per node, which will increase depending on capacity. High Availability is also available for $40/mo. This adds a 99.95% SLA with service credits if breached.
Clusters also require a $12/mo load balancer to route traffic. I do not remember this load balancer being mentioned initially when creating my cluster, but the price does need to be factored in. Any volumes utilized as persistent storage in your cluster will be created as Volume Block Storage and will be billed for utilization.
Digital Ocean previously supplied a k8s dashboard, but they have deprecated support of this. You will need to deploy
a management tools into the cluster using kubectl
or tools available in their Marketplace.
For example, ArgoCD 2.4.0 is available in their marketplace, but I have installed ArgoCD 2.9.3 directly into my cluster.
Container Registry
You can get a single free container repository that has 500MB of storage. They also have a basic plan for $5/mo with 5GB of storage and 5 repositories and professional. Lastly, they have a $20/mo with 100GB of storage and unlimited respositories.
I was original utilizing an external registry, but I found it very convenient to build my containers and upload them to DO.
Utilizing this registry was pretty simple after I learned how to include doctl
in my build pipeline.
While looking at competing options it is important to take storage costs in mind. Options like Azure, GitHub, and AWS will not only have a cost for the service, but also the storage usage. Currently, the only thing being added to DO is transfer costs and overages at $0.02/GB.
Space Buckets
I haven't needed this yet, but space buckets can be used to provide files at scale with CDN capabilities. They start at $5/mo and have additional data transfer fees.
App Platform
The App Platform is a Platform as a Service (PaaS) that allows you to focus on code by taking away infraustructure headaches. DO allows you to take a GitHub/GitLab repository or container registry to automatically build serverless components. The method you choose will determine what resource type you can use. For this website, I have a website built in Next.js in a GitHub repository.
This functionality is not limited to websites. You can create always on containers that are able to respond to incoming requests.
An account comes with 3 free static sites and $3/mo per additional site. The downside with the other app options is the lowest cost is $5/mo. There are definitely cheaper ways to get the same functionality, but they will require managing infrastructure in some way. This site has components that are considered "dynamic" so I could not easily get them to run in a free static site environment.
Functions
Functions are another PaaS option that does not have the cost of a container resource. I have a Python scraper function that writes to a database. This script has been running every 30 minutes for over a year without issue. This function cost rounds down to $0 because you are billed based on runtime.
Databases
The managed database functionality has been relatively simple to use. I can see overall cluster performance and individual query performance. Pricing starts at $13/mo for a database, and can go up to $1,218/mo. Database storage is also charged at $1/mo per 5GB. See the link above for available database engine options.
Databases can be configured to restrict access through networking. Users are configured within the UI and access is configured through normal database configuration.
You can run updates and upgrades through the UI. Their system will scan for compatibility. The last upgrade from PostgreSQL 14 to 15 I ran took 3 attempts to be successful. This hasn't been a huge importance to me so I cannot speak to issues others may have had.
UI
Digital Ocean has built their UI to be simple and easy to use. Other providers have extreme depths to their windows that can be difficult
to navigate for the average user. This simplified UI does come at a limit to what you can do within the website. Any advanced options, like
adding a forwarding rule to a load balancer created with k8s, requires the use of doctl
. Normal load balancer implementations does allow for UI modifications.
doctl
Any automations or scripted actions you create will use doctl
. You can run doctl
locally in windows or load it into a container used during a CI/CD workflow. There is a long list of commands that could spark some ideas.
Because you can modify and manage components in DO you can automate the creation, modification and destruction of resources. You could even use doctl
to retrieve invoice data, which could be helpful if you are in a team with multiple people.