Enterprise Mobile App Development : Dallas Fort Worth Metroplex
Deploying everything (web application, database) in one server is typical for any web application as this is the most easiest and simplest way to deploy. As the number of application users starts to grow, the web application itself needs to be able to handle more requests. Both the application and database contend for the same hardware resources like CPU, Memory, Input/Output (I/O). Allocation of resources could be improved by vertically scaling the resources and adding more memory with optimized hardware like Solid State Drives (SSD) to boost I/O, ultimately adding more CPU power. Optimizing hardware is cheaper than programmers’ time, but as a web application needs to process more and more requests, this type of architecture starts underperforming.
To improve the performance, we can split the application and database between two different servers. This way, the contention of resources between application and database can be eliminated. Another advantage of this optimized hardware architecture is that we can remove your database from Demilitarized Zone (DMZ, which means moving it to a private network where it is not directly accessible from the internet) to improve security. This setup requires careful planning as network performance between the application server and database server can degrade the application performance. Low network latency is the requirement for this kind of setup. Geographically distributed servers (application and database) are not desirable for this kind of setup. Furthermore, As application needs to handle millions of request, we can scale our architecture horizontally by adding load balancers for the application backend and performing database replication where each instance of the application connects to each instance of the replicated database.
The ability to mitigate performance bottlenecks through caching, bundling and minification of assets, and use of profiler are not typical to Django applications but can be used similarly in other web development frameworks. These are the few means that can help improve application performance dramatically but of course it’s not a fully comprehensive list by any means.