• Skip to main content

Uly.me

cloud engineer

  • Home
  • Archives
  • Search

caching

Use Object Versioning With CloudFront

January 11, 2020 by Ulysses

If you are using AWS CloudFront, you can avoid costly invalidations by using object versioning. Due to the nature of CloudFront, overwriting to the same file will not have any effect until caching is invalidated. The default timeout for CloudFront is 24 hours. If you have a website and you’ve overwritten your logo image, the updated image file will not be reflected on your site due to the caching timeout is 24 hours. To avoid invalidation, enable object versioning by adding a policy when overwriting files.

# Logo Image
<a href="logo.png">Website Logo</a>
#
# Implement object versioning. 
# Increase the filename after each logo change.
#
<a href="logo-001.png">Website Logo</a>
<a href="logo-002.png">Website Logo</a>
<a href="logo-003.png">Website Logo</a>
<a href="logo-004.png">Website Logo</a>

# Logo Image <a href="logo.png">Website Logo</a> # # Implement object versioning. # Increase the filename after each logo change. # <a href="logo-001.png">Website Logo</a> <a href="logo-002.png">Website Logo</a> <a href="logo-003.png">Website Logo</a> <a href="logo-004.png">Website Logo</a>

Each time the logo is updated, change the filename to avoid CloudFront invalidation.

Filed Under: Cloud Tagged With: aws, caching, cloudfront, invalidation

Outbound DNS

August 23, 2019 by Ulysses

Here’s a typical setup for an Outbound DNS server.

What are unbound servers? Unbound servers are a validating, recursive and caching DNS server

Install Unbound DNS

yum install unbound

yum install unbound

Configuration: /etc/outbound/outbound.conf

server:
        interface: 0.0.0.0
        access-control: 0.0.0.0/0 allow
        local-zone: "10.in-addr.arpa." nodefault
forward-zone:
        name: "10.in-addr.arpa."
        forward-addr: 169.254.169.253
forward-zone:
        name: "ec2.internal"
        forward-addr: 169.254.169.253
forward-zone:
        name: '.'
        forward-addr: 10.10.10.1
        forward-addr: 10.10.11.2

server: interface: 0.0.0.0 access-control: 0.0.0.0/0 allow local-zone: "10.in-addr.arpa." nodefault forward-zone: name: "10.in-addr.arpa." forward-addr: 169.254.169.253 forward-zone: name: "ec2.internal" forward-addr: 169.254.169.253 forward-zone: name: '.' forward-addr: 10.10.10.1 forward-addr: 10.10.11.2

Unbound Start, Stop, Restart and Status

service outbound start | stop | restart | status

service outbound start | stop | restart | status

Filed Under: Cloud, Linux Tagged With: caching, config, dns, outbound, resolver

  • Home
  • About
  • Contact

Copyright © 2022