All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: Connectivity check uris
Date: Thu, 23 Jan 2020 09:22:21 -0500 (EST)	[thread overview]
Message-ID: <555772143.2167690.1579789341772.JavaMail.zimbra@savoirfairelinux.com> (raw)
In-Reply-To: <fc798fd12d4a06537fd235b6247a0193d1df3022.camel@linuxfoundation.org>

On Jan 23, 2020, at 2:26 PM, Richard Purdie richard.purdie@linuxfoundation.org wrote:
> On Thu, 2020-01-23 at 08:14 -0500, Jean-Marie LEMETAYER wrote:
>> Hi folks,
>> 
>> I have noticed some hang-ups at the beginning of my builds on the
>> master branch.
>> I have search a little and discovered that the connectivity check
>> made by poky
>> was the root cause. In fact connectivity check use the
>> CONNECTIVITY_CHECK_URIS
>> variable which is by default set to "https://www.example.com/".
>> 
>> So I have made some tests with a little script which gets the URI 100
>> times:
>> 
>> 	$ cat connectivity_check.sh
>> 	#!/bin/sh
>> 	connectivity_check()
>> 	{
>> 		local ok=0
>> 		for i in $(seq 100)
>> 		do
>> 			$@ > /dev/null && ok=$(($ok + 1))
>> 		done
>> 		echo $ok $@
>> 	}
>> 	connectivity_check wget -qO- --timeout=1 --tries=1 $1
>> 	connectivity_check curl -s --connect-timeout 1 $1
>> 
>> Note that in the script, I use wget and curl to see if there are any
>> differences
>> but I don't think that's a thing.
>> 
>> Here are the results:
>> 	$ time ./connectivity_check.sh https://example.com
>> 	45 wget -qO- --timeout=1 --tries=1 https://example.com
>> 	45 curl -s --connect-timeout 1 https://example.com
>> 
>> 	real	2m23.595s
>> 	user	0m3.352s
>> 	sys	0m1.834s
>> 
>> 	$ time ./connectivity_check.sh https://openembedded.org
>> 	100 wget -qO- --timeout=1 --tries=1 https://openembedded.org
>> 	100 curl -s --connect-timeout 1 https://openembedded.org
>> 
>> 	real	4m36.188s
>> 	user	0m3.853s
>> 	sys	0m1.761s
>> 
>> 	$ time ./connectivity_check.sh https://google.com
>> 	100 wget -qO- --timeout=1 --tries=1 https://google.com
>> 	100 curl -s --connect-timeout 1 https://google.com
>> 
>> 	real	0m36.328s
>> 	user	0m4.265s
>> 	sys	0m2.028s
>> 
>> So "example.com" is clearly not a good domain to do connectivity
>> checks.
>> 
>> The "openembedded.org" domain is good but have a slow response time.
>> 
>> And finally "google.com" which have all sort of speedy networking
>> stuff is very
>> efficient.
>> 
>> ---
>> 
>> I think the CONNECTIVITY_CHECK_URIS variable must be updated and not
>> use the
>> "example.com" domain anymore. Using "google.com" may be the best
>> option. But
>> eetting up a custom domain like "connectivitycheck.openembedded.org"
>> could be
>> another idea.
>> 
>> Any ideas
> 
> I think if you look at the history we did use google.com however that
> caused problems for people in geos where that is blocked (e.g. PRC).
> 
> We may want to move the default back given the performance isse, not
> sure...

I understand the issue with blocked domains this is why I suggest the
custom domain "connectivitycheck.openembedded.org".

But I dont know if it could be an option. Can OE have a sub-domain like
that? maybe using some cdn to handle the load?

Another option will be to provide multiple URIs:
    CONNECTIVITY_CHECK_URIS ?= " \
        https://google.com \
        https://www.bing.com \
        https://www.baidu.com \
    "

Best regards,
Jean-Marie


  reply	other threads:[~2020-01-23 14:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-23 13:14 Connectivity check uris Jean-Marie LEMETAYER
2020-01-23 13:22 ` Andrey Zhizhikin
2020-01-23 13:26 ` Richard Purdie
2020-01-23 14:22   ` Jean-Marie LEMETAYER [this message]
2020-01-23 14:37     ` Richard Purdie
2020-01-23 14:59       ` Jean-Marie LEMETAYER
2020-01-23 15:23         ` Richard Purdie
2020-01-23 19:25           ` Andre McCurdy
2020-01-24 11:37             ` Jean-Marie LEMETAYER
2020-01-23 13:56 ` Ross Burton
2020-01-23 14:31   ` Jean-Marie LEMETAYER

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=555772143.2167690.1579789341772.JavaMail.zimbra@savoirfairelinux.com \
    --to=jean-marie.lemetayer@savoirfairelinux.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.