What would be best? A single droplet with high specs containing 4-6 websites? Or 6 droplets (1 for each)?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hello,
Great question! When considering hosting multiple domains on DigitalOcean, it’s also crucial to factor in the security implications. Let’s delve into this aspect along with the previously discussed topics.
No Hard Limits on Domains: Indeed, DigitalOcean allows you to host any number of domains on a single Droplet. This flexibility is one of the many advantages of their cloud infrastructure.
Understanding Resource Constraints: As mentioned earlier, each Droplet has limited CPU, RAM, and storage. Hosting multiple websites means these resources are shared, which can impact performance, especially if one site experiences high traffic or a resource-intensive process.
Security Considerations: When hosting multiple domains on a single Droplet, there’s an added dimension to consider: security. If one of the sites gets compromised (e.g., through a hack or a DDoS attack), it could potentially affect the other sites hosted on the same Droplet. Here’s why:
Isolation Strategy: For enhanced security, especially when dealing with high-traffic or sensitive websites, consider using separate Droplets for each domain. This isolation approach offers several advantages:
Setting Up Virtual Hosts: To host multiple domains, you’ll be setting up what’s known as virtual hosts. This is where you configure your web server to serve different content based on the requested domain name.
Apache Example: In Apache, this is done through the
<VirtualHost>
directive in the configuration files. You specify the domain name and document root for each site. It looks something like this:Nginx Example: With Nginx, you use the
server
block. You’ll define a server block for each domain, specifying the server name and the root directory. Here’s a basic example:While hosting multiple domains on a single Droplet is feasible and resource-efficient, it’s important to weigh the security implications. Isolating domains on separate Droplets can offer greater security and performance customization, albeit at a higher cost. Always assess your needs and the sensitivity of your websites when deciding on your hosting strategy.
I hope this provides a clearer picture of the security considerations in multi-domain hosting!
Best,
Bobby
It really depends on how busy the sites are… I personally know people who have 50+ low traffic sites on a 2GB VPS instance (including cPanel - MySQL, Apache, Mail + DNS services). <br> <br>
While its depend on use case, i suggest you to get 2 medium droplet. One for Database and one for website(nginx+X)