Why does creating a subdomain take so long?


tgonhawk1

Recommended Posts

This is just sort of a generic question, and not so much a problem, so I didn't want to open a ticket,
and others might be interested in the answer.

Whenever I either create a subdomain such as xyz.mydomain.com or delete one,
I fill out the form and click the do-it button ... and then wait.

The browser sits there saying "Connecting ...." for something like 3+ minutes,
and then comes back with the "Subdomain xyz.mydomain.com created" message.

It seems like all you'd need to do is update a couple of entries in the "subdomain directory",
or whatever there is, nothing that would take that amount of time.
Is it more complicated than that?

Thanks for answering this curiosity question.

 

Link to comment
Share on other sites

There are multiple systems involved whenever you add a domain to your account, regardless of whether it's an addon domain, subdomain, parked domain, etc. When you add the domain it has to be written to your local hosting servers configuration files (of which there are multiple with cPanel) and also the record has to be inserted into your DNS zone which in our infrastructure is hosted remotely as we use external DNS clusters (not on the same server as your websites for redundancy, etc).

So that may not sound like a lot but there are a ton of scenarios in which you could see a delay in adding/removing a domain. Other users on the server could be adding/removing domains at the same time so the local webserver is busy tracking the changes sanely, the DNS cluster could be updating a ton of records from other customers adding/removing domains so it's delayed on processing, your own DNS zone(s) might contain a lot of records already so each insert and reload of the zone takes a bit of time to process, there could be an errant process causing higher than normal CPU usage on either the local server or remote DNS cluster, and there's probably 100 more technical scenarios we've encountered in the past that I'd need one of our systems guys to chime in on. Combine any of the two of those at once and suddenly you're seeing the behavior you've experienced.

Now with all that said, in a 'perfect' setup all of the above doesn't cause the type of delays you've mentioned and we're painfully aware of that. The issue you're experiencing is known to us and something we've been working on. We've gone so far as to run an 'unsupported' (perhaps that's the wrong word) DNS infrastructure with cPanel for years as the performance gains we've seen are massive compared to what was offered by default with cPanel. Now the good news is as of cPanel 60 they officially added support for our DNS backend software which promises significant performance improvements. We've been testing this internally and we're extremely happy with the results so as soon as everything is ready we'll be rolling that out in hopes to eliminate the problem you mentioned.

TL;DR - Lots of changes in lots of places every time you add a domain. It can be slow right now, but we've got a fix that's nearly production ready.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...