Gradual migration of django monolith to async
I have huge django2 app (without django ORM) and I want to make it asynchronous. Right now i've come up with two strategies:
- upgrade to django 3/4 and migrate to async view by view
- add separate app (fastapi), migrate each view to the new app, and while migration is in progress split traffic between apps on load balancer level.
the problem with first approach is that django will switch between sync and async mode and I will not see any improvements before migrating most of the views.
the problem with second approach is that it is somewhat complicated and will require more code migrations and infra tinkering.
any suggestions?