Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6557793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:07:10+00:00 2026-05-25T13:07:10+00:00

I want to host a PHP application on Cloud to take advantage of on-demand

  • 0

I want to host a PHP application on Cloud to take advantage of on-demand scalability. I am afraid if my application were to get featured on Digg/Slashdot/popular blogs (hopefully all of these places) then my site would very likely crash. So, I was looking into A*mazon EC2, RackSpace Cloud Servers etc.* But I am confused by Cloud Architecture. Hosting a PHP application on regular cPanel based shared-hosting is very simple. FTP upload your code to public_html directory and you are done.

But with cloud, we’d have multiple servers. My understanding is that in Cloud, you get some VM space behind some load-balancer. When you need more resources, you simply provision another VM. Load balancer sends request to all available resources.
So, how do you deal with these things:

  • Session management/session continuity:
    Now, one of the obvious thing here is that Cloud-Server-1 is not going to be aware of user-session on Cloud-Server-2. So, how is this managed in cloud based hosting? Would I be required to re-write some PHP code that deals with sessions?
    (I am thinking of hosting an e-commerce PHP script done in Yii framework)
  • Would the PHP code that deals with session need to be re-written or
    is there an abstraction layer that handles it? Basically, do I simply
    FTP upload the application and then some abstraction layer takes care
    of everything or do I have to re-write some code?

  • Database scaling: When there is heavy load, I think I can configure Amazon EC2 or any cloud-server to automatically provision more servers. And besides, it’s probably a good idea to have multiple servers anyway to increase speed and reliability. But I am not sure how that works. I mean, the “data” in the database has to be shared.

So, how are multiple database-servers maintained? If each database is a real-time copy of each other. Then how will it reduce load? I mean, if you do a query on DB1, and then in real-time, this query is also done in DB2 (if not, the data in DB2 would not be same as DB1) then both DB will have same load.

Some Cloud Servers I am considering are:

  1. Amazon EC2
  2. RackSpace Cloud Sites
  3. RackSpace Cloud Servers
  4. PagodaBox (still in BETA and does not allow crons though): http://www.pagodabox.com/
  5. Go Grid scalable website architecture: http://www.gogrid.com/cloud-hosting/cloud-hosting-packages/scalable-website.php (although this is very very expensive. I was hoping to start with a single server to begin with and then automatically provision extra web-servers and/or extra DB-servers to handle load spikes as needed)

Any tips would be appreciated.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T13:07:11+00:00Added an answer on May 25, 2026 at 1:07 pm

    I talked to tech-support of a hosting company. He didn’t seem like a uber-geek but he gave me this advise: create multiple web-servers & multiple DB servers. Here is how:

    • Multiple web servers: he said you should load image of your
      application on multiple servers. Start-up 1 server initially. If the
      load is high, start-up the other image. Load balancer would
      automatically start sending queries to this new instance of your web
      server.
    • DB Servers: create multiple DB servers. 1 master and several
      slaves.

    He said, you’d need to rewrite some PHP code and do the following:

    1. Session handling: he said modify your PHP code so that sessions are stored in “DB” .

    2. DB related code: Remove all “join” operations. I am not sure if this is even possible to remove ALL join operations. Any tips on how to do this? Is there no way to “scale” while retaining “join” operations?

    That’s all. Really, is it this it? Or do you think there are other things to take care of as well?

    Also, to create multiple DB server instances (master-slave). Write to master only. I would need have at-least two (2) DB servers running at ALL times. If the load isn’t high, wouldnt I be paying for extra DB server for no reason?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to host an application on Windows Azure that stores the credit card
I want to host a web application on a private JVM they offer 32,
I want to host a 32bit application in IIS 7 on 64 bit Windows
I have a google web application project that I want to host on github.
I am writing one web application using PHP/CodeIginter. Now, I want to add a
I'm developing a Web application with PHP 5.3.3. I want it to send confirmation
I want to host StyleCop in a Custom Environment, the sample code provided in
I want to host a WCF service with TCP Protocol. I can host the
I want to host a chrome extension by myself and I want the extension
I'm currently building a website with Django and want to host user bio style

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.