AWS - CloudFront DEMO | Serve BOTH Dynamic & Static Website content

Поделиться
HTML-код
  • Опубликовано: 18 окт 2024

Комментарии • 52

  • @rangeshvenkatesan5856
    @rangeshvenkatesan5856 7 лет назад +1

    Sir ji, For the dynamic content you had set the ttl value '0' and you sent it to the ELB directly, Pls correct my understanding here.
    1. So both static and dynamic are getting cached to the cloud front from the source, right? so it means, like the way we are caching the static content, we should be caching the dynamic content too right? so we shd have some TTL value?
    2. When .i enable cloud front service, what happens behind, does amazon spin up a mirror image of my created infrastructure in the respective locations? what happens on the CDN data centre? coz, when my entire website is getting cached on a location nearer to the user and all the reads and writes go to the respective CDN instead of the source location!! thats amazing ..so i was curious .. what's getting spun there?

    • @knowledgeindia
      @knowledgeindia  7 лет назад +1

      1. TTL = 0, means do not cache. For Dynamic content, we do not cache at Edge Locations rather pass it to origin directly. Only Static assets are cached. In case of Dynamic content, the benefit is that of "traffic leaving Amazon network closer to customer".
      2. There is no image created at Edge Locations. As i said only static assets are cached at Edge Locations, you can think of it as a facility to save files for some duration. Static assets are nothing but images, CSS, JS files etc.

    • @rangeshvenkatesan5856
      @rangeshvenkatesan5856 7 лет назад +1

      ahhh got that , So basically , From the cloud front location amazon will have a dedicated connection to its primary/source AZ and so it wud be more optimal .

    • @knowledgeindia
      @knowledgeindia  7 лет назад +1

      Yes. Amazon has its network in such a manner that if data flow happens from a Region to any Edge Location (or vice-versa) it would use Amazon's network and not public.

  • @prannoyroy5312
    @prannoyroy5312 4 года назад +2

    Thanks for showing this great usecase!

  • @ZachMatics
    @ZachMatics 3 года назад +1

    Great stuff man

    • @knowledgeindia
      @knowledgeindia  3 года назад

      You are most welcome and I look forward to your support in form of LIKE & SHARE..

  • @rahulpoddar7633
    @rahulpoddar7633 4 года назад +1

    Nice tutorial

    • @knowledgeindia
      @knowledgeindia  4 года назад

      Thank you. 😃😃 Please don't stop here, do check out 100+ awesome AWS videos on our channel.. I'm sure you will learn something good from these.. ✌️✌️

  • @girishtiwari79
    @girishtiwari79 4 года назад

    Thanks for very informative video. I am following your videos a lot and appreciate how you articulate and cover the subject completely. I have one question, which option is better(performance/cost) to access s3? cloudfront or vpc gateway endpoint?

    • @knowledgeindia
      @knowledgeindia  4 года назад

      Both have different use cases. I don't think comparing them is correct.

    • @girishtiwari79
      @girishtiwari79 4 года назад

      @@knowledgeindia Thanks.

  • @awscloud6644
    @awscloud6644 6 лет назад +1

    Excellent video!!! Just wanted to know one thing does ELB comes under free tier or there is a cost involve in it.

    • @knowledgeindia
      @knowledgeindia  6 лет назад

      There is some hours usage available in free tier. You can check free tier page .

    • @awscloud6644
      @awscloud6644 6 лет назад

      Thanks mate, just got that!!!

  • @averageamerican1983
    @averageamerican1983 5 лет назад +1

    Excellent...Thank you.

    • @knowledgeindia
      @knowledgeindia  5 лет назад

      I try to explain in easy way. Thanks for appreciating it. Please support us by telling your friends about our videos. Thank you.

  • @pranaytonpay1246
    @pranaytonpay1246 2 года назад

    thanks for the great content ... can i configure 2 origin groups in cloudfront , each having their own primary and failover... So, this is my thought, for the same architecture you described, i would create 2 origin groups , one for dynamic content and other for static. Origin group for Dynamic content would have primary pointing to region1's ALB and failover to region2's ALB. Similarly, Origin group for Static content would have primary pointing to region1's S3 and failover to region2's S3 ... ( the 2 S3 buckets would have CRR configured with RTC too ). Would such an architecture work OR is it not possible ? I did not find any example for such an implementation, so posted here.

  • @100krishna100
    @100krishna100 3 года назад +1

    Thank you for the video. I'm wondering what is the need of using the cloud front distribution for dynamic content. As we are not caching the content(TTL is 0) every time the user hits the Cloud front url the request is always served from the Origin. How are we improving the network performance for the user. Can you please help me understand?

    • @srinivasyalala1767
      @srinivasyalala1767 2 года назад

      I hope, you might have got an answer by this time. Think from Web page which we build and has both static content and dynamic content. When user try to access such type of web page, cloud front use cache for S3 to load faster and dynamic content request is directly sent to origin server to get fresh data always.

  • @akshayjindia
    @akshayjindia 7 лет назад +2

    I have a question: In the code itself you have specified a cloud front URL for images and CSS (static content) and that would leverage the benefits of CDN, then why do you need to specify another behavior for static content in the new distribution that you created ?

    • @knowledgeindia
      @knowledgeindia  7 лет назад

      Please see closely again. There are only 2 behaviors -
      Priority 1 - takes all the dynamic URLs (e.g. aspx, jsp etc.)
      Priority 2 - takes rest all.
      When request comes to CloudFront for an image and if CF has multiple origins available, then it is behavior which decides which origin to be used.

    • @akshayjindia
      @akshayjindia 7 лет назад

      Thanks for your reply. However I need to know one thing. You had created a web-distribution for the static content using S3 bucket as the origin and you had put the same CDN URLs in the EC2 web-servers' page. When those pages would be rendered on the browser, the URL for the static content would be the CDN URL (with all its benefits) irrespective from where that page is coming from. If that is true, why do you need to create a separate behavior for the static content ?

    • @knowledgeindia
      @knowledgeindia  7 лет назад

      Please see the above activity from CloudFront's perspective. it should have a mechanism to find out that incoming request needs to be served from where; and hence 2 behaviors.

    • @akshayjindia
      @akshayjindia 7 лет назад

      Putting CDN URL for images/CSS means that the content WILL be delivered using CDN no matter what. From what I understood, adding only one behavior for .php or * was sufficient, images/CSS by default would be served using CDN (considering that appropriate CDN URLs have been written for them). Anyways, you are my guru in AWS, please don't mind my arguments :) See you @ 8:30 today for your session, really looking forward for that !

  • @venukareti403
    @venukareti403 6 лет назад

    Hi, I have done the configuration, I configured Origin as my ELB and trying to send everything over ELB (static+Dynamic). When I hit cloud front DNS name it is redirecting to my load balancer DNS name and the http link changes on the browser which is pointing to ELB. How to solve this problem of not redirecting?

  • @rameshwar6395
    @rameshwar6395 5 лет назад +2

    @KnowledgeIndia - AWS Tutorials: Thanks for your videos, just clread AWS SA certification.
    Could you please upload video for, On-premises to cloud migration of VMs, Data, Storage etc...
    Every Interview This question is common...can't able to find any valid document regarding migration...

  • @sansagii
    @sansagii 7 лет назад

    Hi Sir , can you please show us some demo on how to setup multiple websites running in single unix web server also how to setup multiple SSL in the ELB . we can see this is one of the interview question .

  • @venukareti403
    @venukareti403 6 лет назад +1

    Hi, If I need the same data of S3 (static content) in the different region, I have an option called cross-region replication but what about the ELB or EC2 (dynamic content), how will you replicate this content if needed in the different region ??

    • @knowledgeindia
      @knowledgeindia  6 лет назад

      Good question. You will have to copy the AMI to another region and create instances from that. Also, the DB will have to be replicated to other region.

    • @knowledgeindia
      @knowledgeindia  6 лет назад

      The right pattern in this case would be that you use S3 to store the persistent files and not EFS.

  • @mohsinnisar8567
    @mohsinnisar8567 3 года назад

    why igw in "private a" subnet?? this should not be NAT gateway?

  • @CasualBiker
    @CasualBiker 4 года назад +1

    Demonstration is good. But most of your videos the audio quality is very feeble. Pls try to use a better mic or use mic closer while speaking in your upcoming videos. Thanks.

    • @knowledgeindia
      @knowledgeindia  4 года назад

      Agree. Have you seen videos uploaded this year?

    • @Fabio-gc1xf
      @Fabio-gc1xf 4 года назад

      Why don't you sponsor him a better mic instead?

  • @shwetakadam7915
    @shwetakadam7915 6 лет назад

    Here the website is hosted on aws s3? or some other web hosting services like heroku or jelastic??

    • @knowledgeindia
      @knowledgeindia  6 лет назад

      website on EC2 and static assets on S3.

    • @shwetakadam7915
      @shwetakadam7915 6 лет назад

      Knowledge India Thank you for replying

    • @shwetakadam7915
      @shwetakadam7915 6 лет назад

      So the website is hosted on ec2 ,the static assets are stored on s3 and cdn is implemented using cloudfront right?
      Just clearing my doubts

    • @knowledgeindia
      @knowledgeindia  6 лет назад

      yes correct..
      You may look at our playlists to learn more. Please share with your friends, if you like these videos.

  • @hemantkumar-sv7wn
    @hemantkumar-sv7wn 5 лет назад

    Hello Sir,
    Cloudfront domain name showing 301 (moving permanently) to ALB domain name?
    I have my PHP application running in private subnets behind an application load balancer. The application load balancer is serving well, checked with that.
    I have set up a custom origin of that ALB to the cloud front distribution. The problem is when I enter the cloud front domain name I see my app with CF domain name in the URL, but once I click or interact with my app the URL shows ALB domain name.
    But if I manually enter CF domain name with path its working. eg: CF.net/dir1/dir2 if I enter manually is working. If I click something it goes like ALB domain name/dir1/dir2
    I assume that I need to look out on cache behavior or server/app
    Kindly provide some suggestions to fix this.

    • @knowledgeindia
      @knowledgeindia  5 лет назад

      try this . stackoverflow.com/questions/38286901/aws-cloudfront-load-balancer-url-changes-from-main-domain-to-load-balancer-su/38288678#38288678

  • @sunil951
    @sunil951 7 лет назад +1

    Please create video on custom error handing on cloudfront. I am facing issue for w3services.net where if pages not available I am getting unexpected errors even set error page setting.Online content on this is less or almost zero . Please help.

  • @hemantkumarrajendran4825
    @hemantkumarrajendran4825 5 лет назад

    Hello Sir,
    I have set up cloud front for entire website to cache dynamic and static content from load balancer and S3 respectively. Also I am able to get cached dynamic and static content by directly using cloud front distribution (means i am able to resolve using cloud front distibution). With origin protocol policy as HTTP Only. have given alternate cname in cloud front (test.example.com)
    The problem is I am not able to resolve using route 53.
    I have created an A record: test.example.com with alias pointing to cloud front distribution.
    I have created A record for domain (zone apex) example.com with alias pointing to test.example.com
    When I use the domain name (example.com) in address bar I am getting this...
    403 ERROR
    The request could not be satisfied.
    Bad request.
    Generated by cloudfront (CloudFront)
    Request ID: 9_BNYnXyRVJOlK8ZpQcAfebbHyYE-ZQ5ca8o9FwzwNuQdw==
    What would be the reason and kindly suggest a solution for the same. Thank you!

  • @AswathyKRaj-no7vv
    @AswathyKRaj-no7vv 5 лет назад

    How are the servers in private subnet accessible from the Internet here?

    • @knowledgeindia
      @knowledgeindia  5 лет назад

      Servers are in private subnet. But we have load elb in public subnet.. that's why

    • @AswathyKRaj-no7vv
      @AswathyKRaj-no7vv 5 лет назад

      @@knowledgeindia Thankyou for responding.. I can see that you have used IGW here for the private subnet in the route table. In what situation do we use NAT instead of IGW ?

    • @knowledgeindia
      @knowledgeindia  5 лет назад

      Check it again. I suggest you watch our playlist on VPC for better understanding. What you wrote above is not correct.