Forum Moderators: coopster

Message Too Old, No Replies

High Load Website

Will my approach be able to handle it?

         

Scally_Ally

11:25 am on Feb 14, 2006 (gmt 0)

10+ Year Member



Hi all,

I have just been given a brief for a very large and hopefully very well used site.. The contractor is saying that hopefully it will have upward of 20,000 members with a large number of them browsing and chatting on the site at any one time.

Within the database there will be everyones user / login info plus alot of other stuff, aswell as the full site being content managed.

My question is whether my choice to use php and mysql to do this is a good one? and will it be able to handle it? If not are there any other options (I am not fully versed enough in .net and sql server to tackle the problem with this) that i could think about?

Any info on this topic would be great, or problems i may run into using this approach would be great..

Thanks

omoutop

12:02 pm on Feb 14, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi Scally_Ally!

Your choise is ideal, php and mysql can easily handle everything that you mention in your post. However, it is also up to you to increase/decrease loading times of pages as well as the whole system's performance. What I would do in your place is to get a very very good design-analysis before even strarting my first line of code. You need to think alot about the interelation of data, about the structure of the database and much more. It also depends on your 'writting' style as a programmer, for instance, huge loops and numerous queries can slow down the page load. In plain words I would insist that you spend some time on the 'Analysis and Design' Stage, the bigger and more complex the system, the longer the analysis, the better the analysis, the more efficient the system!

Hope the best

Scally_Ally

4:07 pm on Feb 14, 2006 (gmt 0)

10+ Year Member



yeah thats brilliant, cheers..

As long as i know that the software can handle the large load.. I agree completely with you that the design and the layout of the data is key to the success of this.

We have just had SQL server installed on the server, do you think that it would be beneficial thinking of using this? is this more high end than mySQl in any case? or can you even use it with php or would i have to take things back to the oldskool and use asp?

Cheers

Mr_Fern

1:55 am on Feb 15, 2006 (gmt 0)

10+ Year Member



php can connect to another of databases. php and mysql just happen to always be mentioned together.

I just have 3 pieces of advice:

tune your queries and create good indexes
if you can, run the sql server on a seperate machine
if you can, install a php opcode cache, that will really decrease the load caused by running php scripts.

omoutop

9:16 am on Feb 15, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



As said by Mr_Fern php can handle all types of databases, even MS access if you want, however the majority of php systems use MySQL...Remember LAMP?
Linux-Apache-Mysql-PHP....Anyway, almost two years ago (during my Msc) we did an analysis on database performance. At that time MySQL could handle better and faster applications than MS SQL SERVER 2000 while reaching ORACLE'sperformance rates, I dont really know about today's rates but I can almost assure you that MySQL can handle what you need. Regarding asp i can not tell you many things since I have rarely used it and to be honest I dont like it (Not any platform independance at all).

DrDoc

9:25 am on Feb 15, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



20K browsing ... should not be a problem. You want to consider scalability and load balancing.

20K chatting, on the other hand ... What kind of chat are we talking? That could very much become a problem, depending on your access to multiple servers. You probably want a Java/C++ chat (or, IRC).

Scally_Ally

10:44 am on Feb 15, 2006 (gmt 0)

10+ Year Member



Thanks guys...

All that information is really helpful and just what i was looking for. I was using the phrase chatting very loosely, its more like an insite email service between members, just using a database to achieve this...

Im not hardcore enough to use C++ properly.... yet..

Thanks again for your help.

omoutop

11:02 am on Feb 15, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Suggestions....

Have you considered to use a forum? If yes you can use phpBB and install a module which enables (registered) users to chat online in real time via an IRC Channel (you can create one or use a public).

vincevincevince

11:05 am on Feb 15, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I suggest postgresql may perform better, and save you operations.

Scally_Ally

3:02 pm on Feb 15, 2006 (gmt 0)

10+ Year Member



that sounds really good omoutop...

Have just been doing some looking about into this area, found a few examples of how it works and it in action.. It looks brilliant and something that would deffinitely go well into my site..

Have you done any of this sort of programming before and if so could you point me in the right direction? Or any online tutorials that you may know of for this?

I have never tried programming something like this before , but it looks well cool.

omoutop

7:46 am on Feb 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



hi Scally_Ally,

you can download phpBB forum from [phpbb.com...] for free, you can easily install it, it is REALLLYY easy.

Regarding the chat you can check out this link
[phpbb.com...]

it is a mod for the phpBB forum along with full instructions how to install it...
The mod is called PJIRC Chat MOD

Hope the best

percentages

8:07 am on Feb 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Scally_Ally,

Your post is not clear, at least to me. Is it 20K user per month, or 20K users all at one time? Well lets say 20% of those which makes 4K users at one time?

20K per month is small fry, 4K online, chatting, at one time is big fish, so what exactly are we talking about here?

I don't believe there is a single dedicated server that can handle 4K chatters at one time, so load bearing comes into play. But 20K per month, a few hundred at one time is a totally different game......need more info if you really want good advice ;)

Scally_Ally

10:20 am on Feb 16, 2006 (gmt 0)

10+ Year Member



its about 20,000 to 50,000 members (hopefully) with, as you said, about 20% of them online at any one time.

The thing that was worrying me is that there will be so much information being stored and totally content managed, with an in site email system created by using the database to store messages, etc, etc.

So the site will be hugely database dependant, my question is whether php and mysql would be able to handle it, but by the look of all the previous posts it looks like it will be able to, as long as i keep my code clean and my database relationships good.

Thanks again

nuwanda

5:09 am on Feb 17, 2006 (gmt 0)

10+ Year Member



Hi

I think a lot of beginning web programmers worry about overhead/load for their apps. I know I do.

My concern relates to the point at which an app should be run from a dedicated server and not just as part of a hosting environment.

Anyone got any thoughts?

R

vincevincevince

2:27 pm on Feb 17, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



the point at which an app should be run from a dedicated server

First, wait until the app starts runnning slowly.

Next, check you have optimum indexes in the database and that your database is in the best possible format.

Then, check you're not wasting CPU cycles with redundant code.

After that, check if your host has a good optimiser installed, e.g. Zend.

Next, complain to your host about the slow performance - maybe they can add memory, move you to a more empty server, a more powerful server, or dedicate a larger slice of CPU to you.

Finally, if all else fails, find a dedicated server. Oh, and a good server admin!

red_gorilla

1:38 pm on Feb 18, 2006 (gmt 0)

10+ Year Member



Wanted to ask the same question but found this topic. So. I’m going to launch one project and hope it will have more then 1k visitors per day browsing and using some features. My question is - can it be done in PHP or we should look for other server side technology to grown in future... I prefer to work with php because I’m familiar enough with it but ready to learn ASP or JSP. I read all answers above but I’m not sure. Do you know any really big project that use LAMP?

Sincerely,
Red gorilla

jatar_k

5:44 pm on Feb 18, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



>> Do you know any really big project that use LAMP?

yes, there are tons

red_gorilla

7:33 pm on Feb 18, 2006 (gmt 0)

10+ Year Member



>>> Do you know any really big project that use LAMP?

>yes, there are tons

So all depends on qualification of programmer, am i right?

But i still wondering what really big projects use LAMP.

Sincerly,
red gorilla

dmorison

8:29 pm on Feb 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> So all depends on qualification of programmer, am i right?

When you start talking about the numbers in question; (4K concurrent users) the answer is yes - the architectural / database design skills of the developer become far more critical.

This is a systems engineering project; of which some components may be identified as being best suited to PHP. At this scale; you cannot sit down and say "We're doing this in PHP and MySQL. Now, what is it we're doing?".

dmorison

8:30 pm on Feb 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



"PHP Gets Major Boost From an Unlikely Spot - Yahoo!":
[webmasterworld.com...]