Django or Flask or Falcon for Microservices [closed] Django or Flask or Falcon for Microservices [closed] flask flask

Django or Flask or Falcon for Microservices [closed]


Microservices is an architecture, not a web* framework choice

I don't think whether your app turns out to be a monolith or a microservice depends on the web framework that you are using (e.g. Django or Flask)

*Unless we're talking about frameworks specifically built to deal with managing microservices (e.g. to facilitate service discovery) web frameworks like Django or Flask are pretty equivalent (input HTTP request, output HTTP response)

Maybe their perceived popularity in a given use case (e.g. Django monolith or Flask microservice) may suggest they are better suited for a particular deployment style, but you could a microservice with Django just as easily as you can a monolith with Flask.

For instance, if I select Flask as my web framework, and in a single Flask app/process I implement all of the services (auth, admin, reporting, payroll, marketing, billing, messaging, search etc), where everything communicates on the code level, then I'd end up with a monolith.

On the other hand, if for instance I take Django, and divide my services into several small Django deploys, and make it so they only communicate through well defined HTTP contracts, and can be updated/deployed independently, then I'd end up with a microservice.

Bottom line is, a microservice is more than just the web framework you use, so use whichever one you like the most, until you have more specific requirements and e.g. 3rd party libs that are useful to you and are only available for a given framework but not the other.