A few principles:
- Test early on, check often.
- Successful systems get more traffic
- Reliability is usually important.
- Caching is often the key to performance
To develop. Create a simple system right now. Even if the business logic is very simplified, if it is a web service and database access, you can test it. Test with one user. What do you see? Where does the time go? As you develop the system by adding to the actual code, continue to do this test. Reasons: a). right now you know that 25ms is even achievable. b) You will find any code changes that immediately impair performance. Now test with a lot of users, which degradation patterns do you click? It begins to give you and indicate your capabilities in the palm of your hand.
I suspect the result will be that one machine does not cut it for you. And even if this happens, if you succeed, you will get more traffic. Therefore, plan to use multiple servers.
And in any case, for reliability reasons, you need more than one server. And all sorts of interesting implementation details fall out when you cannot accept a single server - for example. you no longer have Singleton; -)
In most cases, we get good performance using the cache. Will many users request the same data? Can you cache it? Are there any updates to consider? In this case, do you need a distributed caching system with cluster revocation? This multiserver case reappears.
djna source share