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 7540821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:44:01+00:00 2026-05-30T07:44:01+00:00

If Server 1 has both my database and Memcached as well as www.website1.co.uk –

  • 0

If Server 1 has both my database and Memcached as well as http://www.website1.co.uk – the site will work fine.

But What if I have the following scenario:

Server 1 - Database - Memcached - website1.co.uk 
Server 2 - website2.co.uk
Server 3 - website3.co.uk

How would I set this up so website2 and website3 can all connect, read and write to the memcached db on Server 1 (they can already connect to server 1 and read and write to the DB without memcache).

Would I need to install Memcache on server 2 and server 3 just to be able to connect?

I’ve never used memcache before so it’s a learning experience.

  • 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-30T07:44:02+00:00Added an answer on May 30, 2026 at 7:44 am

    If Servers 1 to 3 are on the same network, you could install memcache on each of the application servers without worry because Memcache is designed for clustered architecture. This simply means that you can run as MANY instances as you want but your application ‘sees’ it as 1 giant memory cache.

    To paraphrase from the memcached’s project wiki:

    //in your configuration file: 
    
    $MEMCACHE_SERVERS = array(
        "10.1.1.1", //web1
        "10.1.1.2", //web2
        "10.1.1.3", //web3
    );
    
    
    //at the 'bootstrapping' phase of your app somewhere:
    
    $memcache = new Memcache();
    foreach($MEMCACHE_SERVERS as $server){
        $memcache->addServer ( $server );
    }
    

    Is your question is related to scaling? If so:

    I’ve seen some people say to have your cache server on the DB server itself. IMHO, this is not very effective as you would want to give your DB server as much physical RAM as you can possibly afford (depending on how large your web app is in terms of traffic and load).

    I would allocate a portion of memory on each of the application servers (Server 2 and Server 3) for caching purposes. That way, if you want to scale out, you just provision one more application server, checkout your source code and add it to your network. This way the size of your memory cache would grow in a linear manner (more or less) as you add for application servers to your server pool.

    All of the above assumes all the servers are on 1 network obviously.

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

Sidebar

Related Questions

Added: Working with SQL Server 2000 and 2005, so has to work on both.
I have a SQL Server 2008 database. This database has three tables: Person -
My server has both Subversion and Apache installed, and the Apache web directory is
My project has both client and server components in the same solution file. I
Lately, when using my TCP/IP Server and Client, I has noticed that they both
I know that Sql Server has some handy built-in quarterly stuff, but what about
Microsoft SQL Server has a nice feature, which allows a database to be automatically
So I have this VB.Net Application. It uses SQL Server database, for which it
We have a bunch of VB6 applications that access two different database servers (both
I have both java and .net applications running on an app server using Microsoft

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.