Re: Somewhat excessive version checks

Поиск
Список
Период
Сортировка
От Khushboo Vashi
Тема Re: Somewhat excessive version checks
Дата
Msg-id CAFOhELcBwMpJ1dUM_XMoA3VSiAz8kBi2h1HXP=OycJ1WkxYx1Q@mail.gmail.com
обсуждение исходный текст
Ответ на Somewhat excessive version checks  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: Somewhat excessive version checks  (Magnus Hagander <magnus@hagander.net>)
Список pgadmin-hackers


On Tue, Jan 12, 2021 at 3:36 AM Magnus Hagander <magnus@hagander.net> wrote:
Hi!

If I read the code correctly, pgadmin will (unless turned off) hit the
website to check the version.json file for updates *every time it
starts*.

Wouldn't it make sense to rate limit that to checking say once per 24
hours maximum? Or even 48?

It seems nobody needs the update *that* quickly, and AFAICT it does
call out to make that check synchronously on startup which means the
user is waiting.

Agreed, we should have some mechanism in place to limit the server hit, maybe an asynchronous call from the client while loading.
 
And if/when doing that, it would be useful to include an
If-Modified-Since header on the request, so the server can just
respond with a tiny 304 reply when there is no update, which is going
to be the majority of the time. Or possibly even more efficiently,
create a custom etag and use If-None-Matches. If you make that etag be
say the version that the client has, it becomes very cheap to check
and you don't need to track any extra data.

--
 Magnus Hagander
 Me: https://www.hagander.net/
 Work: https://www.redpill-linpro.com/


В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Somewhat excessive version checks
Следующее
От: "Huang, Jun"
Дата:
Сообщение: The target connection was wrong in function check_version_compatibility()