How to apply Apache+tomcat to support 3000 people to access online at the same time

Source: Internet
Author: User
Tags netcraft server memory
A cotton E-commerce site, daily trading at the same time online people line of 2500 people on average, mainly online to watch real-time quotes. At the same time, the site provides a large number of information publishing, forums, online e-commerce and other functions. Ready to apply Java EE to implement, the way to apply apache+tomcat, whether can support 3000 people at the same time online access. If not, what good advice, preferably a free Application server problem

A support 3000 users at the same time online system, the key point has not been tightly related to the software problem, but also in the hardware configuration.

A set of WebLogic or websphere a hundred thousand of, for the sake of saving investment, we can recommend customers to use Tomcat or JBoss and other free application clothing
, this paper discusses this issue.

First, the reasons for not choosing Tomcat

1.Tomcat There is no EJB container, if there is distributed requirements will be difficult;

2. From the insurance, in case the application server itself has any loopholes, you can not claim to Apache;

3. Open source software project, there is no commercial services, there is no technical support for problems.


Second, the reason for choosing Tomcat

1, free use, this is the biggest temptation

2. Realize the best application server of Java-EE specification

Tomcat is an important subproject in the Jakarta Project, selected by Javaworld Magazine as the most innovative Java product of the 2001 (Most Innovative
Java Product), and it is the official servlet and JSP Container of Sun Inc. (see http://java.sun.com/products/jsp/tomcat/).

By complying with the Java EE specification, the workload is very small when moving from Tomcat to other platforms. For example, moving something under Tomcat to WebLogic is basically just copy.

3, my project does not need EJB

For many small and medium-sized Java projects in China, EJB technology is not used at all. Most of the applications are to transform the traditional mis into B/s mode, from two-layer structure to three-layer structure,
Datasource+jsp+serverlet can fully meet development needs. Interface with JSP implementation, business logic with JavaBean completed, since the use of Ejb,tomcat can also be
Meet the demand.

4. Tomcat Performance

Doubts about performance may be a reason why many people do not choose to use the server for free. The facts speak louder than words, take a look at some of the following cases:

Sms.qianlong.com Linux+tomcat+apache

Chinese alumni Www.5460.net:Tomcat 4.1.18 Tens of millions of registered users, the number of visits per day reached more than 4 million

Www.west100.com more than 5 million daily visits

Note: Use Netcraft to view the application server used by the target Web site by http://uptime.netcraft.com/up/graph/?host=www.icbc.com.cn,
It's OK to rename the host parameter to the destination address.

Take a look at the evaluation from the Internet (from the Netizen comments http://search.csdn.net/Expert/topic/2277/2277414.xml?temp=.7720301)

Our situation (single machine, no load balancing):
Operating system: RedHat Advanced Server 2.1
Server configuration: Dell 6,650:8 Xeon CPU, 3G RAM, 300G HD
Visit Number: 800,000 +
TOMCAT 4.1.24
JDK 1.4.1_02
JDK Startup Parameters-xmx1024m
No response to the top display Java footprint of 800M or so (actual occupancy to be larger), traffic >80 million (actual situation, not analog access), operating system normal

First: Concurrent traffic is about 1000. (This is actually running out of the data, not the simulation test!)
Second: This machine is only Tomcat

------------------------------------------
Reply person: Zeeler (Duck)

If you do not want to buy a commercial application server, it is recommended that you try using Tomcat for load balancing, that is, multiple tomcat to share concurrent traffic

------------------------------------------
Reply person: liangxuan1979 (not greedy)

We have a lot of different places in this situation and the owners.
The server is also 6650, and the software configuration is also a modular one.
It's just that our interviews are smaller, and the number of people at the same time is about 200-600 people.

------------------------------------------
Reply person: caliban1979 (beetle)

Who says Tomcat can't?
We do www.west100.com more than 5 million visits per day (Webalizer statistics). )
My configuration is Linux operating system, database MySQL
Front squid cache, back up Tomcat service, can run 3, 4 months improper machine
It turns out that everything
I don't want to say anything!

------------------------------------------

Third, summary

It seems that the reason for not choosing Tomcat is very good, the key factor is that the commercial software has the technical Service guarantee, but:

1. Whether you use WebLogic or tomcat, the problem customers will only come to your company instead of looking for bea/ibm them.

2. Whether it's a problem with your program or a WebLogic or Tomcat system platform, it's usually your programmer who modifies the program's bugs or modifies the program's adaptation.
WebLogic or Tomcat bugs.

3.BEA/IBM's door-to-door technology service costs are often higher than the cost of your system platform or even your entire software system's profits. Not a few k of the RMB BEA/IBM technician is not
Going to go out.


If you look at the above words and you are not sure if your project should choose that product, this phrase may help you: the best way to solve the problem is to use the most appropriate method.


No problem.
A system that supports 3000 of users online at the same time, the key point is not tightly related to the software problem, but also in the hardware configuration top

Tomcat can only support 256 concurrent threads, 3000 users at the same time you need to see their concurrent operation is not much, because Tomcat is the application server is the HTTP protocol, rather than TCP protocol, how many people online is not the problem, concurrent links is the root of the problem. Top

Apache+tomcat, support sticky session cluster, easy to more than sufficient.

No problem, I have done similar, our school more than 10,000 people, in 4,000 people at the same time there are no problems. Mainly consider hardware, as well as distributed. Top

Www.west100.com more than 5 million daily visits

Is that we use is TOMCAT4 hehe!

Whether the application server can withstand the pressure mainly in the database operation!

We can change the operation of the database in many ways!

The upstairs is good, the database can be used like a connection pool to do, as far as possible to reduce the pressure on the server top

My site about 20-30 people at the same time online, but Tomcat is always inexplicably dead, said a memory is not enough, the Java VM Memory is the default size, server memory 1G, please help to see what this is the reason, thanks.

2005-08-17 00:33:51 Coyoteadapter A exception or error occurred in the container the during Uest processing
Java.lang.OutOfMemoryError

2005-08-17 08:42:40 coyoteadapter Bad Cookie name:path/value:/web.126.htm
Java.lang.IllegalArgumentException:Cookie name path is a reserved token

I used urlrewritetop on the website.

can be yes. But the data can be transmitted slowly. If the network and hardware configuration is not good, it is possible that there is no access.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.