Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ATS 10.0.x, *_HIT always on event log. NO TCP_MISS with ttl-in-cache on cache.config at all #11743

Open
Solarisbf opened this issue Aug 27, 2024 · 2 comments
Labels

Comments

@Solarisbf
Copy link

Solarisbf commented Aug 27, 2024

hello !

i would like to ask about cache.config

cache.config is below


dest_domain=test2222.kinxzone.com ttl-in-cache=20s


records.yaml is below


records:
  http:
    connect_attempts_max_retries: 3
    cache:
      http: 1
      required_headers: 0
      max_stale_age: 0
    server_ports: 80 80:ipv6 443:ssl
    normalize_ae: 2
  reverse_proxy:
    enabled: 1
  url_remap:
    pristine_host_hdr: 0
    remap_required: 1
  log:
    logging_enabled: 3
    logfile_dir: var/log/trafficserver
    rolling_enabled: 1
    rolling_interval_sec: 300
    rolling_allow_empty: 1
    rolling_max_count: 10
  ssl:
    client:
      version:
        min: 2
        max: 3
      certification_level: 1
      verify:
        server:
          policy: PERMISSIVE
    server:
      multicert:
        exit_on_load_fail: 0
      cert:
        path: /opt/ts/etc/trafficserver/ssl
      private_key:
        path: /opt/ts/etc/trafficserver/ssl
  diags:
    debug:
      enabled: 1

and i did curl https://test2222.kinxzone.com/cat/cat1.jpg

about 20 seconds later, i did curl https://test2222.kinxzone.com/cat/cat1.jpg again

but always *_HIT Nothing TCP_MISS

even i set revalidate 20s
and, pin-in-cache 20s

but same result

i refered https://docs.trafficserver.apache.org/en/10.0.x/admin-guide/files/cache.config.en.html

i know that PURGE method can be used to clear cache exactly

curl -X PURGE https://test2222.kinxzone.com/cat/cat1.jpg

it works well,

and invalidating cache by using regex revalidate plugin as well

event.log is below


1724744803 3 127.0.0.1 200 6345 GET https://test2222.kinxzone.com/cat/cat1.jpg 443 - "curl/7.81.0" - "-" TLSv1.3 TCP_HIT 0 5912 127.0.0.1
1724744804 2 127.0.0.1 200 6345 GET https://test2222.kinxzone.com/cat/cat1.jpg 443 - "curl/7.81.0" - "-" TLSv1.3 TCP_HIT 1 5912 127.0.0.1
1724744804 2 127.0.0.1 200 6345 GET https://test2222.kinxzone.com/cat/cat1.jpg 443 - "curl/7.81.0" - "-" TLSv1.3 TCP_MEM_HIT 2 5912 127.0.0.1
1724744804 2 127.0.0.1 200 6345 GET https://test2222.kinxzone.com/cat/cat1.jpg 443 - "curl/7.81.0" - "-" TLSv1.3 TCP_MEM_HIT 3 5912 127.0.0.1
1724744829 2 127.0.0.1 200 6345 GET https://test2222.kinxzone.com/cat/cat1.jpg 443 - "curl/7.81.0" - "-" TLSv1.3 TCP_MEM_HIT 4 5912 127.0.0.1


i would like to see TCP_MISS on event.log

how to set cache.config for setting ttl exactly ?

Please give me some any informations

@bneradt @calavera @janfrode @biilmann @jpeach @sekimura @mlibbey

thank you !!!

@Solarisbf Solarisbf changed the title ATS 10.0.0, *_HIT always on event log. NO TCP_MISS with ttl-in-cache on cache.config at all ATS 10.0.x, *_HIT always on event log. NO TCP_MISS with ttl-in-cache on cache.config at all Aug 27, 2024
@Solarisbf
Copy link
Author

Solarisbf commented Aug 28, 2024

maybe cache.config does not work at all

please check cache.config please

https://docs.trafficserver.apache.org/en/10.0.x/admin-guide/files/cache.config.en.html

so, i used header_rewrite plugin to set Cache-Control: max-age=<seconds> on READ_RESPONSE_HDR_HOOK

and i solved it

@cmcfarlen
Copy link
Contributor

Reopening for further investigation. Thanks for the report!

@cmcfarlen cmcfarlen reopened this Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants