0

My website is currently running on a VPS. To make the site work, I have a number of resource intensive cron jobs - and when they are running, my site stop responding/becomes incredible slow.

I'm therefore looking at moving the cron jobs somewhere else, so they can get the resources they need and they don't slow down my site.

  1. What are my best options here? Should I get a second VPS for running the cron jobs or is there a better solution? (communication between two VPS will not be a problem, it can be done through a shared db or data files).

  2. If I get a second VPS or similar, I'll not have website on the second VPS. Only a bunch of cron jobs. Will I then need to have a managed VPS or can I get by with an unmanaged one? (I know my way around programming, but I'm no good at server administration).

I have thought about just upgrading my current VPS, but then I cannot separate the resource use of the cron jobs from the resource use of the site. I would like to separate those two things, so my site is always available and fast.

Thanks, Mads

Mads
  • 1

1 Answers1

0

To long for a comment:

Generally your options when you hit resource limitations are either scale up:

  • get a bigger VPS with more resources (more RAM, more vCPU's, faster CPU's)

Scaling up is often easy, but there are limits to how large a single server can scale up. If you can also scale down again that is an easy thing to try first though.

Or scale out:

  • distribute the load over additional (virtual) servers

What works best (with your existing code) really depends.

It also really depends on what is currently the actual resource limit that is blocking your applications, your cron jobs and web site. You need good monitoring data for that.

Scaling out and distributing load will often scale much further, but often also requires a good (re-) design of what to do with your data, files, databases, key/value stores, session data, output etc. Replication, sharding, (read-only) copies, consolidation etc. etc.

If for example your cron jobs currently completely swamp your database and that is what causes your website to freeze, then only moving the cronjobs to a different server won't fix the problem. The database will still be swamped and the website will still lock up.

HBruijn
  • 72,524
  • 21
  • 127
  • 192