What are the possible ways of storing web contents ( images,videos,pdf etc)? [closed] - image

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
We are planning to host one web app which uses multiple resources like banner images, videos, pdf and they need to be changed by time. If we package those resources in app, app size will get increased and in every change we need to repackage and redeploy.
So we have planned to have aws S3 and cloudFront cdn for serving all static web content and we can use them in application.
Please suggest pros and cons of our architecture and other possible ways of achieving it.

Yes. AWS S3 is indeed a very good choice for hosting your static assets.
As stated by AWS itself :
S3 is a highly durable, highly available, and inexpensive object
storage service that can serve stored objects directly via HTTP. This
makes it wonderfully useful for serving static web content directly to
web browsers for sites on the Internet.
What does your "app" do? Is it just to display static content? Or does it have a solid backend?
Since it is unclear, to get started, here is a wonderful resource from the official AWS site :
https://aws.amazon.com/getting-started/projects/build-modern-app-fargate-lambda-dynamodb-python/
They have clearly explained how to host your static content and structure your web app.
The pros of using AWS S3 are that it's really cheap, easy to use and configure.
Cons are ,IF you are just hosting static content, you will be charged for it.Why not use Github pages? It's entirely free!

You could use Azure Blob storage. You may store any file format and it can be secured with a security token for restricted access. It scales without limit and is considered a best practice for large volume web traffic. Hope it helps.

Related

To store images in file system, database, or blob? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I have roughly 600 static images that I need to store and use for my web app and I was wondering what kind of options I have for this application.
What is the typical procedure?
What are my options, and what are the pro's and con's of each?
Thanks ahead of time.
You should store static resources that you want to serve from your site somewhere under the wwwroot folder. I recommend putting them in an images subfolder, but you can use whatever organization works for you. There are many reasons why it can be worthwhile to use a Content Delivery Network (CDN) for serving your static resources, including scripts, stylesheets, and images, in which case you might want to store your images there. For example Amazon CloudFront is an inexpensive CDN service you can use for this purpose. This will speed up your page load times since the images will load in parallel with your site's assets, it will reduce load on your server, and the CDN server will host the images on edge servers that are geographically close to the client (so clients on the other side of the world from your server will get the files faster than if they loaded them from your server).
Overall this isn't so much an ASP.NET Core question, but a general web site question. ASP.NET Core will serve static resources (as long as you have the static files middleware installed), but other than that it doesn't have a lot to do with it. Just put the files under wwwroot and you're good to go unless you think it's worth using a CDN.

When not to use AJAX client-side routing? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Using client-side routing (with Angular's $routeProvider for example), it is possible to load a whole web app at once and not interact with the server anymore.
However this might imply a long load time when visitors first open the web app assuming it has a lot of views.
What are the best practices in terms of client-side routing vs. initial load time?
Well the default behaviour of angular is to have the whole app front loaded. But it depends what your app does and how big it is. If it's a small app you could do that. If your app is huge (unlikely given all the app will do is just show some static data) then it's not really a good idea to load everything up front. For a smaller app it would be OK, especially if you minify everything. But for larger apps, what if you have 10MB of scripts and resources? You're putting a lot of strain on your server and eating your customers bandwidth. Fr large apps you could dynamically load scripts as routes change, we do something similar to this in a pretty huge angular app.
The best practice would be to only get the files that are required to generate the content you want to show to the user on that specific route, which goes against what you want to do. Regarding "not interact with the server anymore", well if your app relies on a server to get some data or do some authentication, you can't really stop interacting with the server.

Clearing up misconceptions about amazon(EC2) and rackspace [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm friends with an owner of a small creative business (with multiple departments) and until now they have been using a dedicated server (via a 3rd party) for a lot of internal projects and they've been known to iframe a few small dev projects (like photo galleries, one page sites etc...) off and on for some of their clients (some with hi traffic sites).
They're looking to switch from the dedicated server to a cloud environment. The owner is enamored with amazon's cloud services, but still wanted some alternative options they also want the new environment to mirror the current one as much as possible (linux/centOS, PHP 5.3, mysql databases) but with the ability to scale when desired.
So the misconceptions I need cleared up and questions I have are:
1) I always assumed amazon's cloud service was more suitable for high end high traffic complex web application (Netflix, pinterest, instagram etc...) rather than the typical server use listed above. Is this correct?
2) Is it possible to mirror their current setup on amazon?
3) If number 1 is not true, but they instead chose rackspace, could they run heavy web apps like Netflix, pinterest, instagram on a rackspace cloud server if they ever decided to do something that advanced (is rackspace scaleable in the same way ec2 is)?
1) Amazon AWS is also suitable for this environment, or even smaller ones (they offer instances as small as "Micro", which are far less capable than what you are describing all the way up to GPU compute clusters).
2) Yes. That is a very common setup for an AWS-based solution. In fact, I recently migrated something similar from Rackspace to AWS.
3) #1 is true. However, you can certainly mix what runs on Rackspace and in the AWS cloud. Keep in mind latency and security issues if the two component solutions need to communicate with each other. Rackspace also has a cloud offering, but it is not as mature as Amazons.

May I use CDN for whole website (PHP, Apache, MySQL) or just for images and CSS, JS files? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
May I use CDN for whole website (PHP, Apache, MySQL) or just for images and CSS, JS files?
What's the best choice > cloud-hosting or dedicated-hosting? Does CDN has that support?
Witch hosting you suggest me the best - the fastest, stablest 100% uptime, CDN, not expensive at all?
CDN hosting is purely for static content only - it is never advised to host a dynamic application on CDN.
CDN is a content delivery network - your hosting company has edge servers on various locations across the globe. Job of these edge servers is to cache your content and deliver to your clients. If edge server doesn't have cached your content, they pull these content from the source server and deliver to your visitor. If they have cached copy, they deliver that immediately. This cache is usually refreshed every 12 hours - it varies host by host.
Since edge servers deliver cached copy, it is never advised to host dynamic websites on CDN Hosting.
Question:
What's the best choice? cloud-hosting or dedicated-hosting? Does CDN
has that support?
Answer:
Cloud hosting is superior by infrastructure. It has redundant array of disk drives and processors. You will enjoy almost 100% uptime on Cloud hosting.
Question:
Witch hosting you suggest me the best - the fastest, stablest 100%
uptime, CDN, not expensive at all?
Answer: From my professional experience, CDN hosting is the fastest, Cloud hosting is stable and 100% uptime and VPS Hosting is not expensive. If you want to make a choice of of these three, Cloud hosting is stable and cost-effective.
From the way the question was phrased, I think managed hosting would be most appropriate for your application.
It is fairly unlikely that you will run into any performance issues that are not self-inflicted (say, by writing suboptimal database queries, performing database processing in the frontend etc) unless you have a significant advertising budget and a mass market application, in which case you should also have a mid-sized IT department that can roll a custom solution.
Weighing cost and reliability against each other can be left to the accountants, for the most part.

Is it possible to use AWS as a web host? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed last year.
The community reviewed whether to reopen this question last year and left it closed:
Original close reason(s) were not resolved
Improve this question
Is it possible to load / host an entire website using AWS? Or is it only a service that can load specific pieces of a website - such as images, etc. Obviously, I'd want to use my own domain. If you can use it, are there any limitations?
Here's the AWS link, for context:
http://aws.amazon.com/s3/
AWS = Amazon Web Services = a suite of different web services.
S3 (which you linked to) is an object store. You can't host a web service on S3.
EC2, also under the AWS umbrella, is virtualized compute space. You CAN host a web service on EC2. It is just like having a server in a rack somewhere, except that when you shut down an instance, it is gone forever. But using EBS, which is like a virtualized hard drive, will prevent you from losing your data when the EC2 instance shuts down.
See http://aws.amazon.com/ec2/ and http://aws.amazon.com/ebs/
EDIT: Aug 12, 2016 they have a dedicated section on how to get started hosting a website on AWS. Please note S3 only allows STATIC websites but AWS provides SDKs in case you want to run PHP, ASP.NET, etc on your instance. See the links for more details.
http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html
https://aws.amazon.com/websites/
So guess what I just found while doing some Google searches for hosting on AWS?! A blog post by the AWS stating that you can (now) host a website on S3. (Funny enough, the StackOverflow and the AWS post were right next to each other in the SERPs!)
http://aws.typepad.com/aws/2011/02/host-your-static-website-on-amazon-s3.html
Yes it is completely possible to host websites on AWS in 2 ways:
1.) Easy - S3 (Simple Storage Solution) is a bucket storage solution that lets you serve static content e.g. images but has recently been upgraded so you can use it to host flat .html files and your site will get served by a default Apache installation with very little configuration on your part (but also little control).
2.) Trickier - You can use EC2 (Elastic Compute Cloud) and create a virtual Linux instance then install Apache/NGinx (or whatever) on that to give you complete control over serving whatever/however you want. You use SecurityGroups to enable/disable ports for individual machines or groups of them.
#danben your EC2 instance does not have a constant public IP by default. Amazon makes you use a CNAME - not an A record as your IP may change under load. You have to pay for an ElasticIP to get a consistent public IP for your setup (or use some sort of DynDNS)
As #danben mentioned, there is a difference between S3 and EC2.
One thing that may be interesting for people looking to host a website on Amazon, specially if they want to start small is that Amazon started offering a free tier some months ago. Together with services like BitNami Cloud Hosting (disclaimer, I helped design it, so it is a bit like my baby :) means you can get your site on the Amazon cloud in just minutes, for basically 0 dollars. You still need to give credit card info to Amazon, but it will not be charged if you stay within the limits of their free tier.
One thing to consider too is that at the time of writing this (Jul 2011), Amazon restricts you to one IP address per server. If you need to host multiple domains, you may need to use name-based virtual hosts or some tricks using their Elastic Load Balancer (which will cost you more). But all in all, it is worth a try if you are a bit technical and want more control than what shared hosting provides you
At reinvent 2018, AWS launched the Amplify Console, a continuous deployment and hosting service for single page and static apps with serverless backends. Check it out: http://console.amplify.aws
Yes! You can easily host your website on AWS.
There are two ways;
One with Native AWS - This is a tricky method that requires expertise and a series of commands to run. You need to manage security, DNS, SSL, server protocols, and more by yourself.
Managed Cloud Platforms like Cloudways - You can easily launch an AWS server and host your website with a few clicks. Moreover, you can quickly manage your server protocols, packages, security firewalls, DNS, and more from its intuitive platform.

Resources