The key to scalability is decoupling. Therefore, in essence, you can think of the problem in terms of "If one of the components does not work, will the other components work fine?" In addition, to avoid doomsday scenarios, you can also independently scale each component horizontally.
With that in mind, let's now move on to your specific use case. Layers for layers is what makes me see nightmares around some Java EE architectures. It not only introduces an unnecessary delay, but also makes it difficult to identify a problem. If your service failed, is there a failure caused by the web server, android application or web service?
If you want to reuse the code, use the reuse code instead of duplicating components. This requires libraries. Take your generic code and extract it as a library and use it on both the web server and the Android app.
source share