I am following the architecture of MicroServices to built and flask file is growing like an elephant/ need suggestion that how much the size of the flask file will affect the performance.
When you follow the microservices architecture, how do you end up with a huge flask file? Are you breaking down a monolith?
Vishwa Bhat
Technology Enthusiast
Size of your flask file has got nothing to do with Performance but it certainly affects _Maintainability, _as your codebase increases and the code is not written in a modular fashion then after 6 months, you'd ask yourself whether you had written that messy code.
And if one of the features/services in your codebase does complex CPU/IO operations and if it's time consuming, now that makes your application slow for the other operation. Of course, fine-tuning the existing application is always the first preferred solution but one of the other ways is to separate it into an isolated micro-service along with dedicated resources and use it from your main application.
So in a nutshell: Size does not impact the performance but the time-consuming ops performed by your application does affect other small operations. DO NOT rewrite/migrate your entire flask app into Django instead pick the heavy lifting operations and separate them as microservices and use them from your main application. Beware, don't overdo splitting of your codebase into microservices unnecessarily because managing interaction between several microservices is different headache altogether.
Cheers!