Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

I am creating some Web Services that would have 2000 concurrent users. The services are offered for free and are hence expected to get a large user base. In the future it may be required to scale up to 50,000 users.

There are already a few other questions that address the issue like - http://stackoverflow.com/questions/2567254/building-highly-scalable-web-serviceshttps://stackoverflow.com/questions/2567254/building-highly-scalable-web-services

However my requirements differ from the question above.

For example - My application does not have a user interface, so images, CSS, javascript are not an issue. It is in Java so suggestions like using HipHop to translate PHP to native code are useless.

Hence I decided to ask my question separately.

This is my project setup -

  1. Rest based Web services using Apache CXF
  2. Hibernate 3.0 (With relevant optimizations like lazy loading and custom HQL for tune up)
  3. Tomcat 6.0
  4. MySql 5.5

What are the best practices to abide by in order to make a Java based application scalable?

I am creating some Web Services that would have 2000 concurrent users. The services are offered for free and are hence expected to get a large user base. In the future it may be required to scale up to 50,000 users.

There are already a few other questions that address the issue like - http://stackoverflow.com/questions/2567254/building-highly-scalable-web-services

However my requirements differ from the question above.

For example - My application does not have a user interface, so images, CSS, javascript are not an issue. It is in Java so suggestions like using HipHop to translate PHP to native code are useless.

Hence I decided to ask my question separately.

This is my project setup -

  1. Rest based Web services using Apache CXF
  2. Hibernate 3.0 (With relevant optimizations like lazy loading and custom HQL for tune up)
  3. Tomcat 6.0
  4. MySql 5.5

What are the best practices to abide by in order to make a Java based application scalable?

I am creating some Web Services that would have 2000 concurrent users. The services are offered for free and are hence expected to get a large user base. In the future it may be required to scale up to 50,000 users.

There are already a few other questions that address the issue like - https://stackoverflow.com/questions/2567254/building-highly-scalable-web-services

However my requirements differ from the question above.

For example - My application does not have a user interface, so images, CSS, javascript are not an issue. It is in Java so suggestions like using HipHop to translate PHP to native code are useless.

Hence I decided to ask my question separately.

This is my project setup -

  1. Rest based Web services using Apache CXF
  2. Hibernate 3.0 (With relevant optimizations like lazy loading and custom HQL for tune up)
  3. Tomcat 6.0
  4. MySql 5.5

What are the best practices to abide by in order to make a Java based application scalable?

removed excess chatter, focused the question onto a single point
Source Link
Kshitiz Sharma
  • 827
  • 4
  • 10
  • 14

I am creating some Web Services that would have 2000 concurrent users. The services are offered for free and are hence expected to get a large user base. In the future it may be required to scale up to 50,000 users.

There are already a few other questions that address the issue like - http://stackoverflow.com/questions/2567254/building-highly-scalable-web-services

However my requirements differ from the question above.

For example - My application does not have a user interface, so images, CSS, javascript are not an issue. It is in Java so suggestions like using HipHop to translate PHP to native code are useless.

Hence I decided to ask my question separately.

This is my project setup -

  1. Rest based Web services using Apache CXF
  2. Hibernate 3.0 (With relevant optimizations like lazy loading and custom HQL for tune up)
  3. Tomcat 6.0
  4. MySql 5.5

My questionsWhat are -

  1. Are there alternatives to Mysql that offer better performance for what I'm trying to do?
  2. What are some general things to abide by in order to scale a Java based web application? I am thinking of putting my Application in two tomcat instances with httpd redirecting the request to appropriate tomcat on basis of load. Is this the right approach?
  3. Separate tomcat instances can help but then database becomes the bottleneck since both applications access the same database? I am a programmer not a Db Admin, how difficult would it be to cluster a Mysql database (or, to cluster whatever database offered as an alternative to 1)?
  4. How effective are caching solutions like EHCache?
  5. Any other general best practices?

Some clarifications -

  1. Could you partition the data?

Yes we could but we're tryingthe best practices to avoid it. We needabide by in order to runmake a lot of data mining algorithms and the design would evolve over time so we can't be sure what lines of partition should be there.Java based application scalable?

I am creating some Web Services that would have 2000 concurrent users. The services are offered for free and are hence expected to get a large user base. In the future it may be required to scale up to 50,000 users.

There are already a few other questions that address the issue like - http://stackoverflow.com/questions/2567254/building-highly-scalable-web-services

However my requirements differ from the question above.

For example - My application does not have a user interface, so images, CSS, javascript are not an issue. It is in Java so suggestions like using HipHop to translate PHP to native code are useless.

Hence I decided to ask my question separately.

This is my project setup -

  1. Rest based Web services using Apache CXF
  2. Hibernate 3.0 (With relevant optimizations like lazy loading and custom HQL for tune up)
  3. Tomcat 6.0
  4. MySql 5.5

My questions are -

  1. Are there alternatives to Mysql that offer better performance for what I'm trying to do?
  2. What are some general things to abide by in order to scale a Java based web application? I am thinking of putting my Application in two tomcat instances with httpd redirecting the request to appropriate tomcat on basis of load. Is this the right approach?
  3. Separate tomcat instances can help but then database becomes the bottleneck since both applications access the same database? I am a programmer not a Db Admin, how difficult would it be to cluster a Mysql database (or, to cluster whatever database offered as an alternative to 1)?
  4. How effective are caching solutions like EHCache?
  5. Any other general best practices?

Some clarifications -

  1. Could you partition the data?

Yes we could but we're trying to avoid it. We need to run a lot of data mining algorithms and the design would evolve over time so we can't be sure what lines of partition should be there.

I am creating some Web Services that would have 2000 concurrent users. The services are offered for free and are hence expected to get a large user base. In the future it may be required to scale up to 50,000 users.

There are already a few other questions that address the issue like - http://stackoverflow.com/questions/2567254/building-highly-scalable-web-services

However my requirements differ from the question above.

For example - My application does not have a user interface, so images, CSS, javascript are not an issue. It is in Java so suggestions like using HipHop to translate PHP to native code are useless.

Hence I decided to ask my question separately.

This is my project setup -

  1. Rest based Web services using Apache CXF
  2. Hibernate 3.0 (With relevant optimizations like lazy loading and custom HQL for tune up)
  3. Tomcat 6.0
  4. MySql 5.5

What are the best practices to abide by in order to make a Java based application scalable?

Post Migrated Here from stackoverflow.com (revisions)
Source Link
Kshitiz Sharma
  • 827
  • 4
  • 10
  • 14

How to design highly scalable web services in Java?

I am creating some Web Services that would have 2000 concurrent users. The services are offered for free and are hence expected to get a large user base. In the future it may be required to scale up to 50,000 users.

There are already a few other questions that address the issue like - http://stackoverflow.com/questions/2567254/building-highly-scalable-web-services

However my requirements differ from the question above.

For example - My application does not have a user interface, so images, CSS, javascript are not an issue. It is in Java so suggestions like using HipHop to translate PHP to native code are useless.

Hence I decided to ask my question separately.

This is my project setup -

  1. Rest based Web services using Apache CXF
  2. Hibernate 3.0 (With relevant optimizations like lazy loading and custom HQL for tune up)
  3. Tomcat 6.0
  4. MySql 5.5

My questions are -

  1. Are there alternatives to Mysql that offer better performance for what I'm trying to do?
  2. What are some general things to abide by in order to scale a Java based web application? I am thinking of putting my Application in two tomcat instances with httpd redirecting the request to appropriate tomcat on basis of load. Is this the right approach?
  3. Separate tomcat instances can help but then database becomes the bottleneck since both applications access the same database? I am a programmer not a Db Admin, how difficult would it be to cluster a Mysql database (or, to cluster whatever database offered as an alternative to 1)?
  4. How effective are caching solutions like EHCache?
  5. Any other general best practices?

Some clarifications -

  1. Could you partition the data?

Yes we could but we're trying to avoid it. We need to run a lot of data mining algorithms and the design would evolve over time so we can't be sure what lines of partition should be there.