Are these calls from your own template/client? If the records are not
critical, ie. for billing, throttling, have you considered just firing a
second js request to the background *in the client* to record the event
after the first ajax request is processed. Or if there are a lot of
requests
Why not publish to a redis qiueue, and then use a separate workers to do
the writes.
redis publish is light weight and fast
T
On Sunday, November 11, 2018 at 6:25:36 AM UTC+8, Zsolt Ero wrote:
>
> On a fairly classic Pyramid app (sync, gunicorn, SQLAlchemy / Postgresql,
> like the starter
On a fairly classic Pyramid app (sync, gunicorn, SQLAlchemy / Postgresql,
like the starter template), I am storing analytics-like events in a table
for some of my views.
Like this skeleton:
@view_config(route_name='test', request_method='POST', renderer='json')
def test(request):
# body of