1

我将开始研究一个巨大的应用程序。在此之前,我想为它做好准备。

这是一个将在全球范围内使用的应用程序,并且将有大量用户同时使用它。

  1. 所以我认为,一台数据库服务器上会有很大的负载,在很短的时间范围内会有大量的数据库请求/查询。所以这会影响系统的性能,对吧?

  2. 如果数据库服务器出现故障,网站所有者将付出巨大的代价。

所以我该怎么做?有什么技术或我可以使用的东西吗?如果我可以使用多个数据库,那么如何?所有数据库都包含相同的信息吗?我可以在差异之间加入表格(使用任何技术或工具)吗?数据库?或者我必须在每个数据库中进行多个查询?

应用程序将使用:jboss、jsp、servlet、mysql

4

1 回答 1

0

It is always best if requirements can be given with some precision. For instance, we expect no more than 1,000 users to be hitting the database simultaneously is a clear design requirement. "There will be a big number of users" is much less helpful. Of course, we can not always predict how much traffic a web application will get and requirements often change over time.

If a database will be experiencing far more reads than writes, then caching data from the database can improve performance. This was the topic of a recent podcast that you might want to listen to: http://javaposse.com/java-posse-399-roundup-12-distributed-caching

Spreading a database among many servers is a complicated task because you need to deal with synchronization issues. Your best bet is to find a service or API that takes care of this issue for you. You can use MySQL, (see this question) but another database designed for this sort of scaling is probably a better choice. Take a look at hadoop.

于 2012-12-01T11:05:12.057 回答