Can you guys support C#?

The short answer to your question is: no. No we cannot support C# or C++.

PHP has an important characteristic that makes it very well suited for web hosting: it’s an interpreted language. What Apache (and Litespeed) does is that whenever a new HTTP request comes in to your account, they spawn a process to handle the request. They will keep this process alive to handle more requests for your account. But once the visitor leaves, the process is stopped. And if you suddenly get a lot or traffic, many new processes can be created to temporarily handle the traffic spike, which are all cleaned up when the traffic dies down.

This means that if there is no traffic on your website, there are no active processes for your account. And that means there is no CPU usage, no memory usage and no other system resource usage (except for disk space of course). This makes PHP very well suited for low traffic websites on a shared environment. Which is what web hosting, and especially free hosting, is designed for.

And, not unimportant: the runtime environment is controlled by the hosting provider, making it easy to enforce limits, security and performance optimizations.

cPanel also has support for other languages, including Perl (through CGI), Python, Ruby and Node.js (through Passenger). But these are also all interpreted languages, which are also run through a runtime controlled by the hosting provider.

.NET on the other hand (which I assume is the actual web engine you want to use, C# and C++ don’t have native web capabilities) could be run on Linux using .NET Core. But this involves compiling your application and running it continuously. This means you’re going to have an active process, consuming CPU power and memory, even if there is no traffic at all. And given how the developer is in control of the runtime process (and fail to properly optimize it) this resource usage could be excessive.

Maybe IIS or another Microsoft service has better tools to run .NET code efficiently in a shared environment. I don’t know much about the Windows hosting ecosystem. And I have no intent to change that.

Especially when there are languages like Go or Rust which are as fast if not faster than these Microsoft languages.

PHP is only slow if your code is slow. Sure, in targeted, artificial benchmarks, you can measure a performance difference between programming languages. But in the real world, user code, database usage, network connectivity and page setup are all much bigger factors for performance than your choice of programming language.

If you want the best performance, go find a provider at a datacenter near you and rent or buy their fastest, most cutting edge dedicated server. You can run whatever software on it written in whatever programming language and it will be blazing fast.

If you don’t want to pay the hundreds or thousands of dollars which that will cost you, you will have to accept that you may lose some performance and flexibility in exchange for cost and ease of use.

4 Likes