简体   繁体   English

确定企业Web应用程序的服务器硬件要求

[英]Determining the server hardware requirements for an enterprise web application

We have been developing a new version of our enterprise application and we are almost ready to start upgrading our customers. 我们一直在开发企业应用程序的新版本,并且几乎准备开始升级客户。 However since everything has changed (both back end and front end) we have to redetermine the server-side hardware requirements, more importantly number of cores and memory needed according to the number of expected users that will use the system on a daily basis. 但是,由于一切都发生了变化(后端和前端),我们必须重新确定服务器端的硬件要求,更重要的是,根据每天使用该系统的预期用户数量,确定所需的内核和内存数量。

The application back-end is written in Java and will be running on Wildfly 8.0.2 app server. 应用程序后端是用Java编写的,将在Wildfly 8.0.2应用程序服务器上运行。 Also this new version of the application is Ajax heavy and each client might be initiating 5 even more requests per second with the possibility of each request opening a database connection to fetch data. 同样,此应用程序的新版本占用了Ajax的大量资源,每个客户端每秒可能会发起5个甚至更多的请求,并且每个请求都有可能打开数据库连接以获取数据。

At the moment we are not using any Java frameworks like ejb or JPA, just a simple service based 3-tiered architecture. 目前,我们没有使用任何Java框架(例如ejb或JPA),而只是使用基于简单服务的3层体系结构。 Assuming a maximum workload of 200 users at the same time (as an example) what kind of resources this would require? 假设同时最多有200个用户的工作负载(例如),这将需要哪种资源? As a reference, the old application (after trial and error) needed around 1 core and 2GB of ram for every 20 users I think. 作为参考,旧的应用程序(经过反复试验)每20个用户需要1个内核和2GB内存。 This time however we want to make a rough estimation before testing and fine tune it afterwards. 但是,这次我们要在测试之前进行粗略的估计,然后再进行微调。

There is no rule for capacity estimation for custom software. 定制软件的容量估算没有规则。 You simply need to test it. 您只需要测试它。 There are plenty of tools around that can help you with that. 周围有很多工具可以帮助您。 You'll probably want to create some acceptance criteria, such as; 您可能需要创建一些接受标准,例如;

  • ability to process X customer orders in Y minutes 能够在Y分钟内处理X个客户订单
  • ability to serve up page Z with a response time < 200ms 能够在响应时间<200毫秒内为Z页提供服务
  • etc 等等

Once your acceptance criteria are set the process usually goes like this; 设置好接受标准后,流程通常如下:

  1. Figure out what are the likely usage patterns/user journeys. 找出可能的使用模式/用户旅程。
  2. Write some tests that generate traffic matching your findings from 1 and also some that test the acceptance criteria. 编写一些测试,以生成与您的1得出的结果相匹配的流量,另外一些则测试接受标准。
  3. Run those tests on reference hardware (just pick something; doesn't really matter what) with different numbers of concurrent users, eg 10, 100, 1000. 在不同数量的并发用户(例如10、100、1000)上,在参考硬件上运行这些测试(只是选择一些东西;什么都没关系)。
  4. Measure how response times alter with the differing number of users. 测量响应时间如何随用户数量的不同而变化。

You now have a reference point/benchmark for performance. 现在,您有了性能的参考点/基准。 You can say that on hardware A our software supports B number of concurrent users with a response time under C. You can expand this for different customer requirements; 可以说,在硬件A上,我们的软件支持B个并发用户,响应时间在C下。 for example if a customer estimates double the traffic you tested with then you might want to have a server cluster to share load in order to maintain performance. 例如,如果客户估计您测试的流量增加了一倍,那么您可能希望让服务器群集共享负载以保持性能。

Once you have some customers in the wild using your software then you can get feedback/gather information on how it performs. 一旦有了一些使用您的软件的客户,您就可以获得有关其性能的反馈/信息。 This will help you refine your benchmarks. 这将帮助您完善基准。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM