V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
Livid
V2EX  ›  Python

pypi.v2ex.com 在试验一个新的 CDN

  •  
  •   Livid · 2013-07-10 10:10:38 +08:00 · 12110 次点击
    这是一个创建于 4167 天前的主题,其中的信息可能已经有所发展或是发生改变。
    如果你最近在国内通过 pypi 安装软件包的速度太慢,那么可以试试切换到 pypi.v2ex.com 的新 CDN,在你的 ~/.pip/ 创建一个 pip.conf 文件,然后填入:

    [global]
    index-url = http://pypi.v2ex.com/simple

    然后你的所有的 pypi 流量就会经过这个新的 CDN。

    然后你可以试试 ping pypi.v2ex.com 的延迟。
    38 条回复    1970-01-01 08:00:00 +08:00
    msg7086
        1
    msg7086  
       2013-07-10 10:14:40 +08:00
    来自 69.28.49.228 的回复: 字节=32 时间=36ms TTL=51
    ushuz
        2
    ushuz  
       2013-07-10 10:21:53 +08:00
    正在 Ping 4b770e2cfb.a.uberlion.com [180.96.70.45] 具有 32 字节的数据:
    来自 180.96.70.45 的回复: 字节=32 时间=53ms TTL=53
    llbgurs
        3
    llbgurs  
       2013-07-10 10:24:50 +08:00
    PING 4b770e2cfb.a.uberlion.com (180.96.70.45) 56(84) bytes of data.
    64 bytes from 180.96.70.45: icmp_req=1 ttl=54 time=43.0 ms
    64 bytes from 180.96.70.45: icmp_req=2 ttl=54 time=65.9 ms
    64 bytes from 180.96.70.45: icmp_req=3 ttl=54 time=98.1 ms
    64 bytes from 180.96.70.45: icmp_req=4 ttl=54 time=43.5 ms
    64 bytes from 180.96.70.45: icmp_req=5 ttl=54 time=50.2 ms
    RelativeLayout
        4
    RelativeLayout  
       2013-07-10 10:26:06 +08:00
    macbb:~ take$ ping pypi.v2ex.com
    PING 4b770e2cfb.a.uberlion.com (180.210.229.138): 56 data bytes
    64 bytes from 180.210.229.138: icmp_seq=0 ttl=52 time=104.902 ms
    64 bytes from 180.210.229.138: icmp_seq=1 ttl=52 time=106.199 ms
    64 bytes from 180.210.229.138: icmp_seq=2 ttl=52 time=104.262 ms
    64 bytes from 180.210.229.138: icmp_seq=3 ttl=52 time=106.051 ms
    64 bytes from 180.210.229.138: icmp_seq=4 ttl=52 time=108.152 ms
    64 bytes from 180.210.229.138: icmp_seq=5 ttl=52 time=119.224 ms
    64 bytes from 180.210.229.138: icmp_seq=6 ttl=52 time=109.158 ms
    64 bytes from 180.210.229.138: icmp_seq=7 ttl=52 time=108.395 ms
    64 bytes from 180.210.229.138: icmp_seq=8 ttl=52 time=103.822 ms
    64 bytes from 180.210.229.138: icmp_seq=9 ttl=52 time=107.777 ms
    64 bytes from 180.210.229.138: icmp_seq=10 ttl=52 time=112.526 ms
    64 bytes from 180.210.229.138: icmp_seq=11 ttl=52 time=406.827 ms
    64 bytes from 180.210.229.138: icmp_seq=12 ttl=52 time=108.443 ms
    64 bytes from 180.210.229.138: icmp_seq=13 ttl=52 time=106.891 ms
    64 bytes from 180.210.229.138: icmp_seq=14 ttl=52 time=108.910 ms
    64 bytes from 180.210.229.138: icmp_seq=15 ttl=52 time=108.659 ms
    64 bytes from 180.210.229.138: icmp_seq=16 ttl=52 time=116.049 ms
    64 bytes from 180.210.229.138: icmp_seq=17 ttl=52 time=107.904 ms
    64 bytes from 180.210.229.138: icmp_seq=18 ttl=52 time=116.605 ms
    ^Z
    [3]+ Stopped ping pypi.v2ex.com
    dndx
        5
    dndx  
       2013-07-10 10:36:50 +08:00
    貌似是这个: http://www.c3edge.com/

    $ ping pypi.v2ex.com
    PING 4b770e2cfb.a.uberlion.com (180.96.70.45): 56 data bytes
    64 bytes from 180.96.70.45: icmp_seq=0 ttl=55 time=46.536 ms
    Request timeout for icmp_seq 1
    64 bytes from 180.96.70.45: icmp_seq=2 ttl=55 time=40.614 ms
    64 bytes from 180.96.70.45: icmp_seq=3 ttl=55 time=41.312 ms
    ^C
    --- 4b770e2cfb.a.uberlion.com ping statistics ---
    5 packets transmitted, 3 packets received, 40.0% packet loss
    round-trip min/avg/max/stddev = 40.614/42.821/46.536/2.643 ms
    66beta
        6
    66beta  
       2013-07-10 10:41:16 +08:00
    最近都用的hk.v2ex.com

    正在 Ping 4b770e2cfb.a.uberlion.com [69.28.49.228]
    来自 69.28.49.228 的回复: 字节=32 时间=300ms TTL=47
    来自 69.28.49.228 的回复: 字节=32 时间=299ms TTL=47
    来自 69.28.49.228 的回复: 字节=32 时间=299ms TTL=47
    来自 69.28.49.228 的回复: 字节=32 时间=300ms TTL=47
    dndx
        7
    dndx  
       2013-07-10 11:00:24 +08:00
    @Livid c3edge.com 的 SSL 证书链不全,没有中间证书,在 Chrome 上打开直接一片大红。

    Actrace
        8
    Actrace  
       2013-07-10 11:00:25 +08:00
    为啊不用google的pagespeed?
    ps.forbk.com
    老大ping试试?
    oldcai
        9
    oldcai  
       2013-07-10 11:08:26 +08:00
    ping pypi.python.org
    PING fallback.global-ssl.fastly.net (103.245.222.184) 56(84) bytes of data.
    64 bytes from 103.245.222.184: icmp_req=2 ttl=51 time=1009 ms
    64 bytes from 103.245.222.184: icmp_req=4 ttl=51 time=622 ms
    64 bytes from 103.245.222.184: icmp_req=5 ttl=51 time=528 ms
    64 bytes from 103.245.222.184: icmp_req=6 ttl=51 time=631 ms
    64 bytes from 103.245.222.184: icmp_req=7 ttl=51 time=693 ms
    64 bytes from 103.245.222.184: icmp_req=8 ttl=51 time=1010 ms
    64 bytes from 103.245.222.184: icmp_req=11 ttl=51 time=685 ms
    64 bytes from 103.245.222.184: icmp_req=12 ttl=51 time=700 ms
    64 bytes from 103.245.222.184: icmp_req=16 ttl=51 time=647 ms
    64 bytes from 103.245.222.184: icmp_req=19 ttl=51 time=630 ms
    64 bytes from 103.245.222.184: icmp_req=21 ttl=51 time=701 ms
    64 bytes from 103.245.222.184: icmp_req=24 ttl=51 time=953 ms
    64 bytes from 103.245.222.184: icmp_req=26 ttl=51 time=1073 ms
    64 bytes from 103.245.222.184: icmp_req=27 ttl=51 time=477 ms
    64 bytes from 103.245.222.184: icmp_req=29 ttl=51 time=1010 ms
    64 bytes from 103.245.222.184: icmp_req=30 ttl=51 time=550 ms
    Muninn
        10
    Muninn  
       2013-07-10 11:23:46 +08:00
    我想请教一下 @Livid
    我最近想搞一个离线的pypi放到公司内网用
    结果用pep381client 同步不下来
    它也不报错 也显示在同步 就是文件夹里没东西

    你的镜像是用哪个工具做同步的呢?我参考一下.
    gamexg
        11
    gamexg  
       2013-07-10 12:43:38 +08:00
    >ping pypi.v2ex.com

    正在 Ping 4b770e2cfb.a.uberlion.com [180.210.229.137] 具有 32 字节的数据:
    来自 180.210.229.137 的回复: 字节=32 时间=69ms TTL=51
    来自 180.210.229.137 的回复: 字节=32 时间=72ms TTL=51
    来自 180.210.229.137 的回复: 字节=32 时间=70ms TTL=51
    来自 180.210.229.137 的回复: 字节=32 时间=68ms TTL=51

    180.210.229.137 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
    往返行程的估计时间(以毫秒为单位):
    最短 = 68ms,最长 = 72ms,平均 = 69ms
    loser
        12
    loser  
       2013-07-10 13:42:47 +08:00
    Pinging 4b770e2cfb.a.uberlion.com [180.96.70.45] with 32 bytes of data:
    Reply from 180.96.70.45: bytes=32 time=39ms TTL=55
    Reply from 180.96.70.45: bytes=32 time=39ms TTL=55
    Reply from 180.96.70.45: bytes=32 time=37ms TTL=55
    Reply from 180.96.70.45: bytes=32 time=36ms TTL=55
    wwqgtxx
        13
    wwqgtxx  
       2013-07-10 14:03:19 +08:00
    C:\Users\Administrator>ping pypi.v2ex.com

    正在 Ping 4b770e2cfb.a.uberlion.com [180.210.229.136] 具有 32 字节的数据:
    来自 180.210.229.136 的回复: 字节=32 时间=149ms TTL=46
    来自 180.210.229.136 的回复: 字节=32 时间=149ms TTL=46
    来自 180.210.229.136 的回复: 字节=32 时间=149ms TTL=46
    来自 180.210.229.136 的回复: 字节=32 时间=149ms TTL=46

    180.210.229.136 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
    往返行程的估计时间(以毫秒为单位):
    最短 = 149ms,最长 = 149ms,平均 = 149ms
    Livid
        14
    Livid  
    MOD
    OP
       2013-07-10 14:06:16 +08:00
    @Muninn 我的做法就是直接做 pypi 源站的反向代理。
    freefcw
        15
    freefcw  
       2013-07-10 14:06:34 +08:00
    我解析到了,180.96.70.45,江苏南京电信,武汉电信过去17s,速度还不错,就是丢包率有点高,线路不是很稳定
    freefcw
        16
    freefcw  
       2013-07-10 14:08:45 +08:00
    错了..最好是17ms,一般在20ms左右,公司的网络有点渣,等回家用武汉联通试试
    wwqgtxx
        17
    wwqgtxx  
       2013-07-10 14:12:30 +08:00
    @Livid 和ORCA有神马区别?
    Muninn
        18
    Muninn  
       2013-07-10 14:58:30 +08:00
    好吧 原来是代理 我再试试pypimirror那个工具 貌似没有文档需要研究
    Muninn
        19
    Muninn  
       2013-07-10 14:59:58 +08:00
    顺便提供延迟 北京联通3G

    /home/muninn> ping pypi.v2ex.com
    PING 4b770e2cfb.a.uberlion.com (180.210.229.135) 56(84) bytes of data.
    64 bytes from 4b770e2cfb.a.uberlion.com (180.210.229.135): icmp_seq=1 ttl=51 time=109 ms
    64 bytes from 4b770e2cfb.a.uberlion.com (180.210.229.135): icmp_seq=2 ttl=51 time=138 ms
    64 bytes from 4b770e2cfb.a.uberlion.com (180.210.229.135): icmp_seq=3 ttl=51 time=97.4 ms
    64 bytes from 4b770e2cfb.a.uberlion.com (180.210.229.135): icmp_seq=4 ttl=51 time=104 ms
    64 bytes from 4b770e2cfb.a.uberlion.com (180.210.229.135): icmp_seq=5 ttl=51 time=103 ms
    banxi1988
        20
    banxi1988  
       2013-07-10 15:04:08 +08:00
    64 bytes from 180.210.229.138: icmp_req=830 ttl=50 time=126 ms
    64 bytes from 180.210.229.138: icmp_req=831 ttl=50 time=118 ms
    64 bytes from 180.210.229.138: icmp_req=832 ttl=50 time=112 ms
    64 bytes from 180.210.229.138: icmp_req=833 ttl=50 time=127 ms
    64 bytes from 180.210.229.138: icmp_req=834 ttl=50 time=146 ms
    64 bytes from 180.210.229.138: icmp_req=835 ttl=50 time=207 ms
    64 bytes from 180.210.229.138: icmp_req=836 ttl=50 time=121 ms
    64 bytes from 180.210.229.138: icmp_req=837 ttl=50 time=125 ms
    64 bytes from 180.210.229.138: icmp_req=838 ttl=50 time=125 ms
    64 bytes from 180.210.229.138: icmp_req=839 ttl=50 time=117 ms
    64 bytes from 180.210.229.138: icmp_req=840 ttl=50 time=143 ms
    64 bytes from 180.210.229.138: icmp_req=841 ttl=50 time=115 ms
    64 bytes from 180.210.229.138: icmp_req=842 ttl=50 time=114 ms
    64 bytes from 180.210.229.138: icmp_req=843 ttl=50 time=110 ms
    64 bytes from 180.210.229.138: icmp_req=844 ttl=50 time=114 ms
    64 bytes from 180.210.229.138: icmp_req=845 ttl=50 time=134 ms
    64 bytes from 180.210.229.138: icmp_req=846 ttl=50 time=94.5 ms
    64 bytes from 180.210.229.138: icmp_req=847 ttl=50 time=103 ms
    64 bytes from 180.210.229.138: icmp_req=848 ttl=50 time=95.7 ms
    64 bytes from 180.210.229.138: icmp_req=849 ttl=50 time=267 ms
    64 bytes from 180.210.229.138: icmp_req=850 ttl=50 time=145 ms
    64 bytes from 180.210.229.138: icmp_req=851 ttl=50 time=114 ms
    64 bytes from 180.210.229.138: icmp_req=852 ttl=50 time=100 ms
    64 bytes from 180.210.229.138: icmp_req=853 ttl=50 time=101 ms
    64 bytes from 180.210.229.138: icmp_req=854 ttl=50 time=147 ms
    64 bytes from 180.210.229.138: icmp_req=855 ttl=50 time=103 ms
    64 bytes from 180.210.229.138: icmp_req=856 ttl=50 time=87.9 ms
    64 bytes from 180.210.229.138: icmp_req=857 ttl=50 time=94.9 ms
    64 bytes from 180.210.229.138: icmp_req=858 ttl=50 time=96.4 ms
    64 bytes from 180.210.229.138: icmp_req=859 ttl=50 time=103 ms
    64 bytes from 180.210.229.138: icmp_req=860 ttl=50 time=110 ms
    64 bytes from 180.210.229.138: icmp_req=861 ttl=50 time=101 ms
    64 bytes from 180.210.229.138: icmp_req=862 ttl=50 time=167 ms
    64 bytes from 180.210.229.138: icmp_req=863 ttl=50 time=110 ms
    64 bytes from 180.210.229.138: icmp_req=864 ttl=50 time=98.3 ms
    64 bytes from 180.210.229.138: icmp_req=865 ttl=50 time=128 ms
    64 bytes from 180.210.229.138: icmp_req=866 ttl=50 time=142 ms
    64 bytes from 180.210.229.138: icmp_req=867 ttl=50 time=94.9 ms
    64 bytes from 180.210.229.138: icmp_req=868 ttl=50 time=102 ms
    64 bytes from 180.210.229.138: icmp_req=869 ttl=50 time=113 ms
    64 bytes from 180.210.229.138: icmp_req=870 ttl=50 time=104 ms
    64 bytes from 180.210.229.138: icmp_req=871 ttl=50 time=99.9 ms
    64 bytes from 180.210.229.138: icmp_req=872 ttl=50 time=97.6 ms
    64 bytes from 180.210.229.138: icmp_req=873 ttl=50 time=109 ms
    64 bytes from 180.210.229.138: icmp_req=874 ttl=50 time=132 ms
    64 bytes from 180.210.229.138: icmp_req=875 ttl=50 time=131 ms
    64 bytes from 180.210.229.138: icmp_req=876 ttl=50 time=129 ms
    64 bytes from 180.210.229.138: icmp_req=877 ttl=50 time=144 ms
    64 bytes from 180.210.229.138: icmp_req=878 ttl=50 time=92.4 ms
    64 bytes from 180.210.229.138: icmp_req=879 ttl=50 time=101 ms
    64 bytes from 180.210.229.138: icmp_req=880 ttl=50 time=100 ms
    64 bytes from 180.210.229.138: icmp_req=881 ttl=50 time=103 ms
    64 bytes from 180.210.229.138: icmp_req=882 ttl=50 time=112 ms
    64 bytes from 180.210.229.138: icmp_req=883 ttl=50 time=110 ms
    ^C64 bytes from 180.210.229.138: icmp_req=884 ttl=50 time=107 ms

    --- 4b770e2cfb.a.uberlion.com ping statistics ---
    884 packets transmitted, 872 received, 1% packet loss, time 7623619ms
    rtt min/avg/max/mdev = 60.070/118.490/322.642/27.653 ms
    kennedy32
        21
    kennedy32  
       2013-07-10 15:22:19 +08:00
    广东电信28ms
    ericFork
        22
    ericFork  
       2013-07-10 15:25:32 +08:00   ❤️ 3
    Livid
        23
    Livid  
    MOD
    OP
       2013-07-10 15:29:42 +08:00
    @ericFork 你的这个应该会具有最好的国内覆盖。

    推荐大家用 pypi.douban.com
    Livid
        24
    Livid  
    MOD
    OP
       2013-07-10 15:30:10 +08:00
    @ericFork 你们在做这个的时候和 Python 官方联系过么?用的源站 IP 是?
    ericFork
        25
    ericFork  
       2013-07-10 15:48:08 +08:00   ❤️ 1
    @Livid 用的是 https://pypi.python.org/pypi/bandersnatch 来做同步,master 直接是 master = https://pypi.python.org
    Kai
        26
    Kai  
    MOD
       2013-07-10 15:49:56 +08:00   ❤️ 1
    pypi.douban.compypi.v2ex.com 速度都在 100ms 左右 XD
    Livid
        27
    Livid  
    MOD
    OP
       2013-07-10 15:50:33 +08:00
    @ericFork 所以你们在北京存了大概 50G 的镜像文件?
    ericFork
        28
    ericFork  
       2013-07-10 16:11:33 +08:00
    @Livid 是的
    Livid
        29
    Livid  
    MOD
    OP
       2013-07-10 16:13:19 +08:00
    @ericFork 非常高质量的做法。感谢。
    Muninn
        30
    Muninn  
       2013-07-10 16:40:25 +08:00
    @ericFork 感激啊 晚上回去试试看能不能同步
    另外请教啊,我如果想做离线环境的镜像,有没有适当减小数据量的办法,比如只要最新版的包,而不是若干个版本都同步下来.
    perl的CPAN也就几G
    pianai
        31
    pianai  
       2013-07-10 16:44:24 +08:00
    Microsoft Windows [Version 5.2.3790]
    (C) Copyright 1985-2003 Microsoft Corp.

    C:\Documents and Settings\Administrator>ping pypi.v2ex.com

    Pinging 4b770e2cfb.a.uberlion.com [180.210.229.137] with 32 bytes of data:

    Reply from 180.210.229.137: bytes=32 time=38ms TTL=53
    Reply from 180.210.229.137: bytes=32 time=38ms TTL=53
    Reply from 180.210.229.137: bytes=32 time=38ms TTL=53
    Reply from 180.210.229.137: bytes=32 time=38ms TTL=53

    Ping statistics for 180.210.229.137:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
    Minimum = 38ms, Maximum = 38ms, Average = 38ms
    chuangbo
        32
    chuangbo  
       2013-07-10 18:47:59 +08:00 via iPhone   ❤️ 1
    @ericFork 哈哈,豆瓣的 pypi 终于发布拉?这个事情其实是我偶然一条微博推进的…
    DeeCheung
        33
    DeeCheung  
       2013-07-10 19:49:43 +08:00
    @ericFork
    @chuangbo

    3Q,终于有国内快得源了,v2ex 的 100ms, douban 10ms,杭州电信。

    之前用中科大,现在404了,国内用 清华的慢死。 就一直在用 a.pypi.python.org
    pityonline
        34
    pityonline  
       2013-07-10 22:38:05 +08:00
    ping -f -c 1000 pypi.v2ex.com

    PING 4b770e2cfb.a.uberlion.com (180.210.229.135) 56(84) bytes of data.
    ..
    --- 4b770e2cfb.a.uberlion.com ping statistics ---
    1000 packets transmitted, 998 received, 0% packet loss, time 14644ms
    rtt min/avg/max/mdev = 50.249/51.711/61.159/1.538 ms, pipe 6, ipg/ewma 14.658/51.212 ms

    PING 4b770e2cfb.a.uberlion.com (180.210.229.135) 56(84) bytes of data.
    ...
    --- 4b770e2cfb.a.uberlion.com ping statistics ---
    1000 packets transmitted, 997 received, 0% packet loss, time 14598ms
    rtt min/avg/max/mdev = 33.667/35.683/49.652/1.946 ms, pipe 4, ipg/ewma 14.613/36.240 ms
    bdnet
        35
    bdnet  
       2013-07-11 10:46:23 +08:00
    正在 Ping global-ssl.fastly.net [199.27.77.184] 具有 32 字节的数据:
    来自 199.27.77.184 的回复: 字节=32 时间=508ms TTL=51
    来自 199.27.77.184 的回复: 字节=32 时间=561ms TTL=51
    请求超时。
    来自 199.27.77.184 的回复: 字节=32 时间=539ms TTL=51

    199.27.77.184 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 3,丢失 = 1 (25% 丢失),
    往返行程的估计时间(以毫秒为单位):
    最短 = 508ms,最长 = 561ms,平均 = 536ms
    wwqgtxx
        36
    wwqgtxx  
       2013-07-14 11:00:31 +08:00
    C:\Users\Administrator>ping pypi.v2ex.com

    正在 Ping 061.mul.hkg01.hk.krill.c3edge.net [180.210.229.135] 具有 32 字节的数据
    :
    来自 180.210.229.135 的回复: 字节=32 时间=151ms TTL=46
    来自 180.210.229.135 的回复: 字节=32 时间=151ms TTL=46
    来自 180.210.229.135 的回复: 字节=32 时间=151ms TTL=46
    来自 180.210.229.135 的回复: 字节=32 时间=152ms TTL=46

    180.210.229.135 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
    往返行程的估计时间(以毫秒为单位):
    最短 = 151ms,最长 = 152ms,平均 = 151ms

    C:\Users\Administrator>
    xiaojay
        37
    xiaojay  
       2013-07-14 12:38:24 +08:00
    @ericFork 赞,用了帝联科技的cdn?
    ericFork
        38
    ericFork  
       2013-07-14 13:35:49 +08:00
    @xiaojay 是的,这个域名用的就是帝联
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   4694 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 09:50 · PVG 17:50 · LAX 01:50 · JFK 04:50
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.