[squid-users] Setting Squid to work with a remote DB?
roee klinger
roeeklinger60 at gmail.com
Sun Aug 29 10:15:02 UTC 2021
Yes, this is what I am doing now. I am creating a local install of MySQL
and than I am replicating the table into the local install, but I would
prefer to get around that.
On Sun, Aug 29, 2021 at 4:01 AM His Shadow <shadowpilot34 at gmail.com> wrote:
> You could write a service that occasionally dumps user credentials
> into some format, like json and have your external helpers download
> it, parse it and use it as local cache. There will be delay, when
> adding new users, but authentication would be very fast. Unless the
> database is huge of course.
>
> сб, 28 авг. 2021 г. в 21:59, roee klinger <roeeklinger60 at gmail.com>:
> >
> > Hello,
> >
> > I have multiple Squid servers installed in different data centers across
> different cloud providers, and they all need to authenticate users using a
> single database (MySQL) on a separate server, which is also on a different
> cloud provider on a different data center.
> >
> > I have already written an external authentication script that reads from
> MySQL and everything is working fine, however, I have some performance
> concerns, since the DB is located externally and in a different region of
> the world from the Squid server.
> >
> > I made some speed tests to see how long it takes to query the DB as
> Squid would:
> >
> > if the database is located on the same machine as Squid:
> 1.067-millisecond average query
> >
> > if the database is located on the same datacenter as Squid:
> 2.67-millisecond average query
> >
> > if the database is located on a different datacenter than Squid
> (different country as well): 38.9-millisecond average query
> >
> >
> > Now I am wondering, is 36-millisecond average added query time a big
> deal when dealing with HTTP/S traffic? how significant is this added time
> to Squid and will performance get hurt drastically?
> >
> > I know there is some caching going on the Squid side, but I had to set
> the caching to really low values (around 15s), as per the requirement I was
> given.
> >
> > If I will have no other choice, I will simply replicate the DB table
> from the DB server to the Squid server, but I prefer not to do that, as it
> will require installing MySQL on all the Squid servers (or some other DB,
> but then I have to do replication from different DBs).
> >
> > Thanks.
> >
> > _______________________________________________
> > squid-users mailing list
> > squid-users at lists.squid-cache.org
> > http://lists.squid-cache.org/listinfo/squid-users
>
>
>
> --
> HisShadow
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20210829/e26943cd/attachment.htm>
More information about the squid-users
mailing list