Performance and security PHP x C ++ for web

3

Today I work in a company that manages some sites with too big traffic, which is causing some server overload problems and so on. These sites are mostly news portals and are running Wordpress, these sites the more they grow in data volume the more they dredge resources exponentially.

In my research I came up with an idea if it would be possible to create a CMS for large C ++ portals using CGI, aiming to handle stupid upload loads and also aiming for security and robustness.

Here are some questions:

1 - C ++ running on CGI will it actually 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 - How much more secure should it be?

3 - Could it really be worth creating such a system targeting large portals?

    
asked by anonymous 08.05.2017 / 04:51

1 answer

3
  

1 - C ++ running on CGI will it actually 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 that is slow. But do not expect miracles. And do not expect it 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 do not know how to do it might even be worse than WP. If you write in C # you may have a performance close to that of C ++ without its risks and difficulties, especially if you use the .NET Core .

  

2 - How much more secure should it be?

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

  

3 - Could it really be worth creating such a system targeting large portals?

Only you can answer that. I have already made it clear that for me C # is the solution, it is much faster than PHP and much less risky than C ++, and much more productive. It helps the fact that I know this, after all the best tool is the one you know. Some people prefer Java.

Conclusion

Honestly, when people ask this they should not approach C ++ which requires a very strong computing domain.

    
08.05.2017 / 05:28