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
Let's say I want to implement storage server, which would be used as a place to store files, images, etc. from different websites. Something like S3, but only for my projects.
I thought about some API/Gateway on PHP, which would save files from those websites to appropriate server, but is it a good way? And should I use Webdav or maybe NFS/SMB, which protocol is more secure and fast?
Can you please give me advice how to create my own storage server? Especially I want to hear about appropriate stack for that, thank you.
There are a number of projects for building your own NAS or SAN (I think that is what you're looking for). Look at the FreeNAS project for example. It does require quite a bit of memory though (depending on the size of your storage and the demands you put on it).
When you want to build your own NAS, you will not need very powerful CPU's, unless you want to run apps on the NAS (FreeNAS provides a system for runnning containerized applications on the NAS, using it's storage) but you will need memory and of course plenty of disks, again depending on what your exact requirements are.
However, if you're simply looking for a place to store your own files and they are not extremely large or a huge number of files, then you could simply build a Linux server and push (or pull) the files using SFTP, it only uses OpenSSH and a single port, fully encrypted with minimal overhead.
Related
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 2 years ago.
Improve this question
I am a newbie and trying to create a CGI server. The server will get request from different clients (the server will have to open chrome and do something, so different chrome profiles for every client). I will receive requests using PHP. What is the best practice to do so? Is docker to be used in this case?
As was stated in the comment, there are lots of possibilities and the best practice could vary quite a bit by company, architecture, and tech stack.
But all things being equal, I can say that this is typically a good use case for Docker. And it'd be a good place to start.
Other options:
Going with a non-containerized approach... Run the CGI server directly on a host (could be physical for virtual). One tradoff here is that the host's environment must be configured to support the server vs. the just the container's environment.
Doubling down on a containerzied approach... If you plan on running multiple workloads across different containers (i.e. beyond a single CGI server), you may look at utilizing a container orchestrator, the defacto being Kubernetes.
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 6 years ago.
Improve this question
What are the pros and cons of building your own web server, and the difference between building your own versus installing a 'pre-configured' web servers (such as: LAMP, WAMP, XAMPP, and other else). Is there any good benifits of building your own web server?
If you're gonna have your own server, would you rather build it on your own, or just download one from the internet? and Why?
Building your own web-server
Pros:
It will work exactly according to your taste
It will use the technologies of your choice
At the end you will know virtually everything about it, while with other webservers sometimes that is not possible
You will be famous if you implement something fantastic
Cons:
You will have to do a lot of complicated stuff which will delay the start of the task you wanted to work on in the first place
You on your own will not be capable to be even close to other webservers, developed by many programmers. You are one, they are legion
As times are changing, modern techniques will pour up and you will need to do a lot of work to adapt to the changes
Other webservers are free in many cases, while developing your webserver is very expensive: you pay with your sweat and tears
But the most important point is that before you start implementing your webserver try out others. Even if you reach to the conclusion that you want to write your own your experience with other webservers will help you a lot in planning yours.
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
I currently have a dedicated server and I'm looking to set up a MySQL database, PHP query code and images directory that can be used by multiple sites. A majority of the sites will be hosted on the same machine, but some will not. My simple way of thinking is that this is possible similar to how Roundcube's code and database is centralized.
Looking for some expert input and direction on whether or not it is this simple or if there is a better way of accomplishing this.
In my opinion, you could two a couple of things to improve your situation:
store your images in just one place, and use that place as a CDN to deliver contents across your sites;
About your code:
if it's possible, use packages in order to create a single package for all the "common" code;
use this package on every site that needs that code, as a simple dependency. Tools like Composer are great to handle dependency management;
No big problems with MySQL databases unless you have big traffic numbers. In that case, you should study MySQL scaling. But first of all, focus on PHP and common assets (like images).
EDIT:
be sure to set appropriate permissions for the external sites, of course;
using packages for your dependencies will be very useful also for sites placed outside the dedicated server;
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 8 years ago.
Improve this question
I need to design a mobile application which requires a lot of database queries. A lot of means, a peak value can be 1 million in a sec. I dont know which database to use and which backed to use. In client side, i will be using phonegap for android and ios and i will be needing a webinterface for pc also.
My doubts are, i am planning to host the system online and use google cloud message to push data to users.
Can online hostings handle this much traffic?
I am planning to use php as backed. Or python?
the software need not be having a lot of calculation but a lot of queries.
And, which database system to use? Mysql or, google cloud sql?
Also tell me about using hadoop or other technologies like load balancers.
I may be totally wrong about the question itself.
Thank you very much in advance.
From what I understand, if you want to store unstructured data and retrieve it really fast, you should be looking at NoSql segment for storage and try to do a POC using a few of the available solutions in market. I would like to suggest giving a try to Aerospike NoSql DB which has a track record of easily doing 1 Million TPS on a single machine.
Google AppEngine could be the answer, it could be programmed in python or php (or java) and easily support scaling up to millions of requests per second and scaling down to just a few to save the resources (and your money).
they use their own NoSQL db, however there's a possibility to use SQL-based backend (not recommended).
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
I am trying to create a blog using blogspot. It seems it is not possible to upload anything other than image files to blogspot. I want to upload a PHP file. I managed to upload the file to google sites, but it is coming as downloadable there instead of executing.
Is there a work-around here other than buying my own server space?
Is there a work-around here other than buying my own server space?
Nope. You can upload PHP files to those services all you want, but you'll never have them executed.
Buying your own server space is usually the best way to go.
There are free hosting offers around but I know of none that is any good, except maybe for the Google App Engine that is free up to a (very generous) traffic limit, in combination with Quercus. That, however, is a very specialized solution, going to be a lot of work to even get started with, doesn't support all modules of PHP, and something rather for professional applications.
But you could simply pay some cheap hosting for PHP, and move your stuff to wordpress.
There's hundred of hostings out there for as low as $1.99 a month, and with that you can host as many PHP files as you like.
Alternatively, you could stick to blogspot, and when you want to use PHP, you can just link to your other server (the one hosting PHP).