Another option is taking the memory intensive things, which are usually resource intensive in many ways and also take lots of time to execute relative to most HTTP requests, and breaking into a job for execution in your job execution framework of choice.
-
-
Show this thread
-
Then you do a bit of work on front end to kick off job and poll for status rather than just “run query and maybe render page or maybe timeout.” This in very unglamorous engineering but it is often both better UX and stops systemwide issues stemming from teeny portion of app.
Show this thread -
Worth knowing: depending on how you route requests to web server processes having one process which has a 15s request rather than your typical 200ms can cause many of your regular requests to take 15.2s as they queue up unhappily behind the long request, and this is vewwwy quiet.
Show this thread
End of conversation
New conversation -
-
-
I wrote extensively about fragmentation in Ruby here:https://www.speedshop.co/2017/12/04/malloc-doubles-ruby-memory.html …
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
This does wonderful things to the page cache as well, esp. noticeable if using network storage like EBS or persistent disk.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.