Score:0

Pros/Cons of running separate user accounts for an administrative subdomain?

tr flag

What are the pros/cons of creating a separate account for an administrative subdomain rather than adding a subdomain under the same account?

Specifically, but limited to:

  • Server load/process management (eg: process hanging/conflicts).
  • Server security.
  • MySQL query processing (eg: process heavy query hanging).
  • Cross-site code library sharing (eg: storing only 1 copy of a code library with Read, Write, and/or Execute permissions for each site).

Other Factors/Clarifications:

  • Server is a dedicated server using CloudLinux v7.9 & cPanel v100.0, running Apache v2.4, PHP v7.4 and MySQL v10.2-MariaDB.
  • Likely, I will be using cPanel's scripts/interface to create the account separation.
  • We're talking 1 primary domain and 1 administrative subdomain (for example: www.mydomain.com and admin.mydomain.com).
  • The primary domain and admin subdomain will be managed by the same people.
  • Most of the code for each will be independent from one-another except for some code libraries which they will need to share, whether by duplicating the code or sharing them from a common directory.
ua flag
What problems are you having? Security? Performance? Sharing of resources? I doubt if MySQL is relevant here -- its 'server' runs as a single 'user'.
matteo avatar
tr flag
@RickJames The question of MySQL is to suggest a separate user account for that as well with access to the common database, essential silo'ing all points of access from that one account. This is also how the cPanel scripts handle account creation.
ua flag
MySQL has a separate "login" mechanism from the OS's.
matteo avatar
tr flag
@RickJames Yes, I am aware of this. Nevertheless, I think the question can still extend to MySQL. For example, if there are 2 separate MySQL accounts, are there processing advantages to doing this? I know that it may be easier to identify a hanging/blocking query process by the MySQL user who executed it, but I am not aware if one account might affect the others access of the data when running simultaneous requests, specifically process-heavy requests. Both applications will be significantly dependent on the same database. Could running an admin report lock up the public-facing domain?
Score:0
ua flag

if there are 2 separate MySQL accounts, are there processing advantages to doing this?

Short answer: No.

Long answer:

Performance and interference depend on "connections", not 'who' is connecting.

Logging into MySQL provides "security" information via "Grants". This usually translates to which databases (etc) that user is allowed to access and whether they are allowed read versus write access. Also, a "user" may be denied access if they have exceeded some quota (this feature is rarely used.) "Roles" are just a variation on "Grants".

After that, each connection has an equal shot at CPU and I/O resources. When there are "too many" connections actively performing queries, they all are slowed down.

Linux has "nice", which applies to OS logins and to the shared mysqld server, but not to individual database connections.

(For this discussion, MySQL == MariaDB.)

There is one exception. The 'root' (SUPER) login to MySQL can get an extra "connection" even when max_connections is hit. (This is a question of access, not performance.)

matteo avatar
tr flag
Thanks! This is very helpful! Might you have any insights regarding the other elements of my question?
Score:0
cn flag
Bob

Creating separate management domains only makes sense when you delegate control to different people and/or different teams within an organization and/or external suppliers.

Or when you set up for example a test, integration or training area separate from production.

Otherwise when resources are managed by the same people a single pane of glass, a single management domain is preferred.


Note that how you set up your management domains is different from how you can and should set your application run time environments.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.