نمایش نتایج: از شماره 1 تا 14 از مجموع 14
سپاس ها 1سپاس

موضوع: استفاده از دو کش در اسکویید

  
  1. #1
    نام حقيقي: Ahmad

    عضو غیر فعال
    تاریخ عضویت
    Jan 2011
    محل سکونت
    esfahan
    نوشته
    8
    سپاسگزاری شده
    0
    سپاسگزاری کرده
    1

    استفاده از دو کش در اسکویید

    سلام
    بنده رو راهنمایی بفرمایید که کجای کد زیر در اسکویید مشکل داره که از دو cache_peer داده شده از هیچ کدام استفاده نمیکنه و از خط اصلی واسه دانلود فایلها استفاده میکنه

    http_port 3128 transparent

    cache_mem 64 MB

    dead_peer_timeout 30 seconds
    hierarchy_stoplist cgi-bin ?
    acl QUERY urlpath_regex cgi-bin \?
    no_cache deny QUERY

    maximum_object_size 1024 KB
    maximum_object_size_in_memory 32 KB
    minimum_object_size 0 KB


    cache_replacement_policy lru
    memory_replacement_policy lru


    cache_dir aufs /cache 4096 9 256


    cache_replacement_policy heap LFUDA


    cache_access_log /var/log/squid/access.log
    cache_store_log none


    pid_filename /var/run/squid.pid


    acl manager proto cache_object
    acl localhost src 127.0.0.1/255.255.255.255
    acl to_localhost dst 127.0.0.0/8
    acl SSL_ports port 443 563
    acl Safe_ports port 80 # http
    acl Safe_ports port 21 # ftp
    acl Safe_ports port 443 563 # https, snews
    acl Safe_ports port 70 # gopher
    acl Safe_ports port 210 # wais
    acl Safe_ports port 1025-65535 # unregistered ports
    acl Safe_ports port 280 # http-mgmt
    acl Safe_ports port 488 # gss-http
    acl Safe_ports port 591 # filemaker
    acl Safe_ports port 777 # multiling http
    acl CONNECT method CONNECT

    acl mrtgserver src 192.168.18.5/255.255.255.255


    acl all src 0.0.0.0/0.0.0.0
    acl mynet2 src 192.0.0.0/255.0.0.0


    http_access allow manager localhost
    http_access deny manager
    http_access deny !Safe_ports
    http_access deny CONNECT !SSL_ports
    http_access deny to_localhost

    http_access allow localhost
    http_access allow mynet2


    http_reply_access allow all

    cache_effective_user proxy
    cache_effective_group proxy

    half_closed_clients off
    cache_swap_high 95%
    cache_swap_low 90%

    visible_hostname Cache

    cache_mgr info@domain.com

    quick_abort_min 0 KB
    quick_abort_max 0 KB
    quick_abort_pct 0

    client_db off

    logfile_rotate 10

    buffered_logs on

    negative_ttl 3 minutes
    positive_dns_ttl 15 hours

    pipeline_prefetch on

    memory_pools off

    log_icp_queries off

    acl snmpkey snmp_community padmins
    snmp_port 3401
    snmp_access allow snmpkey mrtgserver
    snmp_access deny all



    acl files urlpath_regex -i \.doc$ \.swf$ \.exe$ \.iso$ \.msi$ \.mpg$ \.mpeg$ \.bmp$ \.txt$ \.dat$ \.dll$ \.mp3$ \.3gp$ \.cab$ \.psf$ \.flv$ \.pdf$ \.ram$ \.avi$ \.wma$ \.wmv$ \.js$ \.css$ \.xml$ \.zip$ \.jar$ \.sis$ \.bin$ \.rpm$ \.png$ \.jpg$ \.jpeg$ .jpg .gif*
    cache_peer 192.168.18.250 parent 8080 0 default no-query
    never_direct allow files
    always_direct allow !files


    acl files1 urlpath_regex -i \.exe$ \.rar$
    cache_peer 192.168.18.251 parent 4480 0 default no-query
    never_direct allow files1
    always_direct allow !files1



    موضوعات مشابه:

  2. #2
    نام حقيقي: Peyman Yousefi

    عضو ویژه شناسه تصویری darklove
    تاریخ عضویت
    Oct 2005
    محل سکونت
    ABHAR
    نوشته
    3,330
    سپاسگزاری شده
    1005
    سپاسگزاری کرده
    318
    نوشته های وبلاگ
    7
    مشکل که زیاد دارد.
    Squid ورژن چنده ؟



  3. #3
    نام حقيقي: Ahmad

    عضو غیر فعال
    تاریخ عضویت
    Jan 2011
    محل سکونت
    esfahan
    نوشته
    8
    سپاسگزاری شده
    0
    سپاسگزاری کرده
    1
    سلام آقای یوسفی
    ممنونتون میشم راهنمایی بفرمایید کجا مشکل داره

    Squid 2.7 Stable
    server ubuntu 10.04 lts



  4. #4
    نام حقيقي: Ahmad

    عضو غیر فعال
    تاریخ عضویت
    Jan 2011
    محل سکونت
    esfahan
    نوشته
    8
    سپاسگزاری شده
    0
    سپاسگزاری کرده
    1
    با یک cache_peer مشکلی ندارم خوب کار میکنه اما از وقتی دومی رو اضافه کردم اولی هم کار نمیکنه
    ممنون میشم اساتید و دوستانی که در این زمینه آگاهی دارند راهنمایی بفرمایند.



  5. #5
    نام حقيقي: Peyman Yousefi

    عضو ویژه شناسه تصویری darklove
    تاریخ عضویت
    Oct 2005
    محل سکونت
    ABHAR
    نوشته
    3,330
    سپاسگزاری شده
    1005
    سپاسگزاری کرده
    318
    نوشته های وبلاگ
    7
    شما فایل ها را دو دسته کنید و هر کدام را به یک cache_peer بفرستید.



  6. #6
    نام حقيقي: Ahmad

    عضو غیر فعال
    تاریخ عضویت
    Jan 2011
    محل سکونت
    esfahan
    نوشته
    8
    سپاسگزاری شده
    0
    سپاسگزاری کرده
    1
    نقل قول نوشته اصلی توسط darklove نمایش پست ها
    شما فایل ها را دو دسته کنید و هر کدام را به یک cache_peer بفرستید.
    استاد عزیز آقای یوسفی اگر من تازه کار که یک ماهی بیشتر نیست با لینوکس و بخصوص اسکویید آشنا شدم میدونستم چطوری هر کدوم رو به یک cache_peer
    بفرستم سوالی مبنی بر استفاده دو کش مطرح نمی کردم و مزاحم دوستان و اساتید نمیشدم
    اگر هم برای رفع مشکلم مبلغی باید بپردازم در پیغام خصوصی بهم اطلاع بدید

    ببخشید خیلی رک حرفمو زدم



  7. #7
    نام حقيقي: Peyman Yousefi

    عضو ویژه شناسه تصویری darklove
    تاریخ عضویت
    Oct 2005
    محل سکونت
    ABHAR
    نوشته
    3,330
    سپاسگزاری شده
    1005
    سپاسگزاری کرده
    318
    نوشته های وبلاگ
    7
    کد:
    acl files1 urlpath_regex -i \.doc$ \.swf$ \.exe$ \.iso$ \.msi$ \.mpg$ \.mpeg$
    acl files2 urlpath_regex -i \.bmp$ \.txt$ \.dat$ \.dll$ \.mp3$ \.3gp$ \.cab$
    
    cache_peer 192.168.18.250 parent 8080 0 default no-query
    never_direct allow files1
    always_direct allow !files1
    
    cache_peer 192.168.1.2 parent 8080 0 default no-query
    never_direct allow files2
    always_direct allow !files2



    nice4u سپاسگزاری کرده است.

  8. #8
    نام حقيقي: Ahmad

    عضو غیر فعال
    تاریخ عضویت
    Jan 2011
    محل سکونت
    esfahan
    نوشته
    8
    سپاسگزاری شده
    0
    سپاسگزاری کرده
    1
    نقل قول نوشته اصلی توسط darklove نمایش پست ها
    کد:
    acl files1 urlpath_regex -i \.doc$ \.swf$ \.exe$ \.iso$ \.msi$ \.mpg$ \.mpeg$
    acl files2 urlpath_regex -i \.bmp$ \.txt$ \.dat$ \.dll$ \.mp3$ \.3gp$ \.cab$
    
    cache_peer 192.168.18.250 parent 8080 0 default no-query
    never_direct allow files1
    always_direct allow !files1
    
    cache_peer 192.168.1.2 parent 8080 0 default no-query
    never_direct allow files2
    always_direct allow !files2
    از روشی که شما لطف کردین استفاده کردم اما باز از هیچکدوم از cache_peer استفاده نمیکنه و همه فایلها رو از گتوی میگیره
    با یک cache_peer خیلی خوب کار میکنه اما وقتی دومی اضافه میشه هیچکدوم کار نمیکنه!!



  9. #9
    نام حقيقي: Peyman Yousefi

    عضو ویژه شناسه تصویری darklove
    تاریخ عضویت
    Oct 2005
    محل سکونت
    ABHAR
    نوشته
    3,330
    سپاسگزاری شده
    1005
    سپاسگزاری کرده
    318
    نوشته های وبلاگ
    7
    parent کنید slibing



  10. #10
    نام حقيقي: Ahmad

    عضو غیر فعال
    تاریخ عضویت
    Jan 2011
    محل سکونت
    esfahan
    نوشته
    8
    سپاسگزاری شده
    0
    سپاسگزاری کرده
    1
    منظور شما رو از slibing متوجه نشدم هر چی گشتم تو نت چیزی دستگیرم نشد میشه کمی شفافتر بفرمایید بازم ممنون



  11. #11
    نام حقيقي: Ahmad

    عضو غیر فعال
    تاریخ عضویت
    Jan 2011
    محل سکونت
    esfahan
    نوشته
    8
    سپاسگزاری شده
    0
    سپاسگزاری کرده
    1
    از دوستان کسی نیست کمک کنه یا اینکارو واسم انجام بده؟



  12. #12
    نام حقيقي: امیرحسین فتوحی

    عضو عادی شناسه تصویری Star-x
    تاریخ عضویت
    Jan 2011
    محل سکونت
    نیشابور
    نوشته
    743
    سپاسگزاری شده
    347
    سپاسگزاری کرده
    198
    Peer Configuration
    First, let's look at the squid.conf
    options available for hierarchy
    configuration. We will then work
    through the most common
    hierarchy structures, so that you
    can see the way that the options
    are used.
    You use the cache_peer option
    to configure the peers that Squid
    will communicate with. Other
    options are then used to select
    which peer to pass a request to.
    The cache_peer
    Option
    When communicating with a
    peer, Squid needs some basic
    information about how to talk to
    the machine; the hostname, what
    ports to send queries to, and so
    forth. The cache_peer config line
    does this. Let's look at an
    example line:
    Example 7-1. The cache_peer
    tag
    c a c h e _ p e e r c a c h e . d o m a i n . e x a m p l e p a r e n t 3 1 2 8 3 1 3 0 d e f a u l t
    The cache_peer option is split
    into five fields. The first field
    ( cache.domain.example) is the
    hostname or IP of the cache that
    is to be queried. The second field
    indicates the type of relationship,
    and must be set to either parent
    or sibling or multicast. The third
    field sets the HTTP port of the
    destination server, while the
    fourth sets the ICP (UDP) query
    port. The fifth field can contain
    more than zero or more
    keywords, although we only use
    one in the example above; the
    keyword default sets that the
    cache will be used as the default
    path to the outside world. If you
    compiled Squid to support HTCP,
    your cache will automatically
    attempt to connect to TCP port
    4827 (there is currently no
    option to change this port value).
    Cache digests are transferred via
    the HTTP port specified on the
    cache_peer line.
    Here is a summary of the
    available cache_peer options:
    proxy-only. Data retrieved from
    this remote cache will not be
    stored locally, but retrieved again
    on any subsequent request. By
    default Squid will store objects it
    retrieves from other caches: by
    having the object available locally
    it can return the object fast if it's
    ever requested again. While this
    is good for latency, it can be a
    waste of bandwidth, especially if
    the other cache is on the same
    piece of ethernet. In the
    examples section of this chapter,
    we use this option when load-
    balancing between two cache
    servers.
    weight. If more than one cache
    server has an object (based on
    the result of an ICP query), Squid
    decides which cache to get the
    data from the cache that
    responded fastest. If you want to
    prefer one cache over another,
    you can add a weight value to
    the preferred cache's config line.
    Larger values are preferred.
    Squid times how long each ICP
    request takes (in milliseconds),
    and divides the time by the
    weight value, using the cache
    with the smallest result. Your
    weight value should thus not be
    an unreasonable value.
    ttl. This tag is covered in the
    multicast section, later in this
    chapter.
    no-query. Squid will send ICP
    requests to all configured caches.
    The response time is measured,
    and used to decide which parent
    to send the HTTP request to.
    There is another function of
    these requests: if there is no
    response to a request, the cache
    is marked down. If you are
    communicating with a cache that
    does not support ICP, you must
    use the no-query option: if you
    don't, Squid will consider that
    cache down, and attempt to go
    directly to the destination server.
    (If you want, you can set the ICP
    port on the config line to point to
    the echo port, port 7. Squid will
    then use this port to check if the
    machine is available. Note that
    you will have to configure
    inetd.conf to support the UDP
    echo port.) This option is
    normally used in conjunction
    with the default option.
    default. This sets the host to be
    the proxy of last resort. If no
    other cache matches a rule (due
    to acl or domain filtering), this
    cache is used. If you have only
    one way of reaching the outside
    world, and it doesn't support ICP,
    you can use the default and no-
    query options to ensure that all
    queries are passed through it. If
    this cache is then down, the
    client will see an error message
    (without these options, Squid
    would attempt to route around
    the problem.)
    round-robin. This option must be
    used on more than one
    cache_peer line to be useful.
    Connections to caches
    configured with this options are
    spread evenly (round-robined)
    among the caches. This can be
    used by client caches to
    communicate with a group of
    loaded parents, so that load is
    spread evenly. If you have
    multiple Internet connections,
    with a parent cache on each side,
    you can use this option to do
    some basic load-balancing of the
    connections.
    multicast-responder. This
    option is covered in the multicast
    section later in this chapter.
    closest-only.
    no-netdb-exchange. If your
    cache was configured to keep
    ICMP (ping) timing information
    with the --enable-icmp
    configure option, your cache will
    attempt to retrieve the remote
    machine's ICMP timing
    information from any peers. If
    you don't want this to happen
    (or the remote cache doesn't
    support it), you can use the no-
    netdb-exchange option to stop
    Squid from requesting this
    information from the cache.
    no-delay. Hits from other caches
    will normally be included into a
    client's delay-pool information. If
    you have two caches load-
    balancing, you don't want the
    hits from the other cache to be
    limited. You may also want hits
    from caches in a nearby
    hierarchy to come down at full
    speed, not to be limited as if they
    were misses. Use the no-delay
    option to ensure that requests
    come down at their full speed.
    login. Caches can be configured
    to use usernames and
    passwords on accesses. To
    authenticate with a parent cache,
    you can enter a username and
    password using this tag. Note
    that the HTTP protocol makes
    authenticating to multiple cache
    servers impossible: you cannot
    chain together a string of
    proxies, each one requiring
    authentication. You should only
    use this option if this is a
    personal proxy.



  13. #13
    نام حقيقي: Ahmad

    عضو غیر فعال
    تاریخ عضویت
    Jan 2011
    محل سکونت
    esfahan
    نوشته
    8
    سپاسگزاری شده
    0
    سپاسگزاری کرده
    1
    نقل قول نوشته اصلی توسط Star-x نمایش پست ها
    Peer Configuration
    First, let's look at the squid.conf
    options available for hierarchy
    configuration. We will then work
    through the most common
    hierarchy structures, so that you
    can see the way that the options
    are used.
    You use the cache_peer option
    to configure the peers that Squid
    will communicate with. Other
    options are then used to select
    which peer to pass a request to.
    The cache_peer
    Option
    When communicating with a
    peer, Squid needs some basic
    information about how to talk to
    the machine; the hostname, what
    ports to send queries to, and so
    forth. The cache_peer config line
    does this. Let's look at an
    example line:
    Example 7-1. The cache_peer
    tag
    c a c h e _ p e e r c a c h e . d o m a i n . e x a m p l e p a r e n t 3 1 2 8 3 1 3 0 d e f a u l t
    The cache_peer option is split
    into five fields. The first field
    ( cache.domain.example) is the
    hostname or IP of the cache that
    is to be queried. The second field
    indicates the type of relationship,
    and must be set to either parent
    or sibling or multicast. The third
    field sets the HTTP port of the
    destination server, while the
    fourth sets the ICP (UDP) query
    port. The fifth field can contain
    more than zero or more
    keywords, although we only use
    one in the example above; the
    keyword default sets that the
    cache will be used as the default
    path to the outside world. If you
    compiled Squid to support HTCP,
    your cache will automatically
    attempt to connect to TCP port
    4827 (there is currently no
    option to change this port value).
    Cache digests are transferred via
    the HTTP port specified on the
    cache_peer line.
    Here is a summary of the
    available cache_peer options:
    proxy-only. Data retrieved from
    this remote cache will not be
    stored locally, but retrieved again
    on any subsequent request. By
    default Squid will store objects it
    retrieves from other caches: by
    having the object available locally
    it can return the object fast if it's
    ever requested again. While this
    is good for latency, it can be a
    waste of bandwidth, especially if
    the other cache is on the same
    piece of ethernet. In the
    examples section of this chapter,
    we use this option when load-
    balancing between two cache
    servers.
    weight. If more than one cache
    server has an object (based on
    the result of an ICP query), Squid
    decides which cache to get the
    data from the cache that
    responded fastest. If you want to
    prefer one cache over another,
    you can add a weight value to
    the preferred cache's config line.
    Larger values are preferred.
    Squid times how long each ICP
    request takes (in milliseconds),
    and divides the time by the
    weight value, using the cache
    with the smallest result. Your
    weight value should thus not be
    an unreasonable value.
    ttl. This tag is covered in the
    multicast section, later in this
    chapter.
    no-query. Squid will send ICP
    requests to all configured caches.
    The response time is measured,
    and used to decide which parent
    to send the HTTP request to.
    There is another function of
    these requests: if there is no
    response to a request, the cache
    is marked down. If you are
    communicating with a cache that
    does not support ICP, you must
    use the no-query option: if you
    don't, Squid will consider that
    cache down, and attempt to go
    directly to the destination server.
    (If you want, you can set the ICP
    port on the config line to point to
    the echo port, port 7. Squid will
    then use this port to check if the
    machine is available. Note that
    you will have to configure
    inetd.conf to support the UDP
    echo port.) This option is
    normally used in conjunction
    with the default option.
    default. This sets the host to be
    the proxy of last resort. If no
    other cache matches a rule (due
    to acl or domain filtering), this
    cache is used. If you have only
    one way of reaching the outside
    world, and it doesn't support ICP,
    you can use the default and no-
    query options to ensure that all
    queries are passed through it. If
    this cache is then down, the
    client will see an error message
    (without these options, Squid
    would attempt to route around
    the problem.)
    round-robin. This option must be
    used on more than one
    cache_peer line to be useful.
    Connections to caches
    configured with this options are
    spread evenly (round-robined)
    among the caches. This can be
    used by client caches to
    communicate with a group of
    loaded parents, so that load is
    spread evenly. If you have
    multiple Internet connections,
    with a parent cache on each side,
    you can use this option to do
    some basic load-balancing of the
    connections.
    multicast-responder. This
    option is covered in the multicast
    section later in this chapter.
    closest-only.
    no-netdb-exchange. If your
    cache was configured to keep
    ICMP (ping) timing information
    with the --enable-icmp
    configure option, your cache will
    attempt to retrieve the remote
    machine's ICMP timing
    information from any peers. If
    you don't want this to happen
    (or the remote cache doesn't
    support it), you can use the no-
    netdb-exchange option to stop
    Squid from requesting this
    information from the cache.
    no-delay. Hits from other caches
    will normally be included into a
    client's delay-pool information. If
    you have two caches load-
    balancing, you don't want the
    hits from the other cache to be
    limited. You may also want hits
    from caches in a nearby
    hierarchy to come down at full
    speed, not to be limited as if they
    were misses. Use the no-delay
    option to ensure that requests
    come down at their full speed.
    login. Caches can be configured
    to use usernames and
    passwords on accesses. To
    authenticate with a parent cache,
    you can enter a username and
    password using this tag. Note
    that the HTTP protocol makes
    authenticating to multiple cache
    servers impossible: you cannot
    chain together a string of
    proxies, each one requiring
    authentication. You should only
    use this option if this is a
    personal proxy.
    دوست عزیز اگه اینقدر حرفه ای بودم میرفتم تو انجمن خودش سوالمو مینوشتم
    آقای یوسفی فرمودند از slibing استفاده کنم. اما هر چی در نت جستجو کردم از چگونگی استفاده این دستور چیزی دستگیرم نشد.



  14. #14
    نام حقيقي: Peyman Yousefi

    عضو ویژه شناسه تصویری darklove
    تاریخ عضویت
    Oct 2005
    محل سکونت
    ABHAR
    نوشته
    3,330
    سپاسگزاری شده
    1005
    سپاسگزاری کرده
    318
    نوشته های وبلاگ
    7
    کد:
    	cache_peer parent.foo.net       parent    3128  3130  default
    cache_peer sib1.foo.net         sibling   3128  3130  proxy-only
    	cache_peer sib2.foo.net         sibling   3128  3130  proxy-only




کلمات کلیدی در جستجوها:

192.168.18:8080

http:192.168.18:8080

http192.168.18:8080

url:http:192.168.18:8080

htttp:192.168.18:8080http:192.168.18.250:8080192.168.18.:8080پاک کردن کش اسکوییدsquid icmp cache_peericmp اسکوییدکش منیجر اسکوییدکدهای حرفه ای برای اسکویید

برچسب برای این موضوع

مجوز های ارسال و ویرایش

  • شما نمی توانید موضوع جدید ارسال کنید
  • شما نمی توانید به پست ها پاسخ دهید
  • شما نمی توانید فایل پیوست ضمیمه کنید
  • شما نمی توانید پست های خود را ویرایش کنید
  •