Python Web Development with Sanic by Adam Hopkins
Author:Adam Hopkins [Hopkins, Adam]
Language: eng
Format: epub
Tags: python, web development, django, flask, sanic, sanic framework, web applications, async, security
Publisher: Packt Publishing
Published: 2022-03-25T00:00:00+00:00
To give you some context, here is a snippet from the Sanic User Guide that provides some insight how other systems operate:
âApache httpd server default keepalive timeout = 5 seconds
Nginx server default keepalive timeout = 75 seconds
Nginx performance tuning guidelines uses keepalive = 15 seconds
IE (5-9) client hard keepalive limit = 60 seconds
Firefox client hard keepalive limit = 115 seconds
Opera 11 client hard keepalive limit = 120 seconds
Chrome 13+ client keepalive limit > 300+ secondsâ
https://sanicframework.org/en/guide/deployment/configuration.html#keep-alive-timeout
How do you know if you should increase the timeout? If you are building a single-page application where your API is meant to power a JS frontend, there is a high likelihood that your browser will make a lot of requests. This is generally the nature of how these frontend applications work. This would be especially true if you expect users to click a button, browse through some content, and click some more. The first thing that comes to my mind would be a web portal type application where a single user might need to make dozens of calls within a minute, but they might be spaced out by some interval of browsing time. In this case, increasing the timeout to reflect the expected usage might make sense.
This does not mean that you should increase it too far. First, as we see above browsers generally have a limit to the maximum they will hold a connection open. Second, going too far with connection length can be wasteful and harmful to your memory performance. It is a balance that you are after. There is no one good answer, so you may need to experiment to see what works.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
What's Done in Darkness by Kayla Perrin(26530)
Shot Through the Heart: DI Grace Fisher 2 by Isabelle Grey(19011)
The Fifty Shades Trilogy & Grey by E L James(18967)
Shot Through the Heart by Mercy Celeste(18885)
Wolf & Parchment: New Theory Spice & Wolf, Vol. 10 by Isuna Hasekura and Jyuu Ayakura(16992)
Python GUI Applications using PyQt5 : The hands-on guide to build apps with Python by Verdugo Leire(16882)
Peren F. Statistics for Business and Economics...Essential Formulas 3ed 2025 by Unknown(16810)
Wolf & Parchment: New Theory Spice & Wolf, Vol. 03 by Isuna Hasekura and Jyuu Ayakura & Jyuu Ayakura(16705)
Wolf & Parchment: New Theory Spice & Wolf, Vol. 01 by Isuna Hasekura and Jyuu Ayakura & Jyuu Ayakura(16334)
The Subtle Art of Not Giving a F*ck by Mark Manson(14268)
The 3rd Cycle of the Betrayed Series Collection: Extremely Controversial Historical Thrillers (Betrayed Series Boxed set) by McCray Carolyn(14073)
Stepbrother Stories 2 - 21 Taboo Story Collection (Brother Sister Stepbrother Stepsister Taboo Pseudo Incest Family Virgin Creampie Pregnant Forced Pregnancy Breeding) by Roxi Harding(13435)
Scorched Earth by Nick Kyme(12718)
Drei Generationen auf dem Jakobsweg by Stein Pia(10926)
Suna by Ziefle Pia(10849)
Scythe by Neal Shusterman(10274)
International Relations from the Global South; Worlds of Difference; First Edition by Arlene B. Tickner & Karen Smith(9482)
Successful Proposal Strategies for Small Businesses: Using Knowledge Management ot Win Govenment, Private Sector, and International Contracts 3rd Edition by Robert Frey(9318)
This is Going to Hurt by Adam Kay(9107)
