PHP x C++ web performance and security

Asked

Viewed 306 times

3

Today I work in a company that manages some sites with too much traffic, which is generating some problems of server overload and etc. These sites are mostly news portals and are running Wordpress, these sites the more they grow in data volume the more they drag resources exponentially.

In my research an idea arises whether it would be possible to create a CMS for large C++ portals using CGI, aiming to handle stupid loads of access and also aiming at safety and robustness.

Here I have some doubts:

1 - C++ running on CGI will really be more performative than PHP on Apache2? (I know this depends a lot on the application, but take into account a well written and architected application)

2 - Which is the safest?

3 - It might really be worth creating such a system for large portals?

1 answer

4


1 - C++ running on CGI will really be more performative than PHP on Apache2? (I know this depends a lot on the application, but take into account a well written and architected application)

Yes, especially if you use Nginx and avoid CGI which is slow. But do not expect miracles. And also do not expect that just because you want to write something good, it will happen for sure. C++ is more difficult.

Wordpress has its own overhead. If you write something good in PHP you will already have a huge gain, but if you don’t know how to do it could be even worse than WP. If you write in C# you may have a performance close to that of C++ without the risks and difficulties of it, especially if you use .NET Core.

2 - Which is the safest?

Security depends on the code. If well done no matter the language. As this does not usually happen, the higher risk is using C++.

3 - It might really be worth creating such a system for large portals?

Only you can answer that. I’ve already made it clear that for me C# is the solution, it’s much faster than PHP and much less risky than C++, and much more productive. Help the fact that I know this, after all the best tool is the one you know. There are those who prefer Java.

Completion

Honestly, when a person asks this question he should not approach C++ that requires a very strong computing domain.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.