How do I setup Drupal with EC2 scaling?
Drupal core code creates files only when a user uploads a file. With third-party modules, files could be created in other cases. For example, if you are using Apache Solr Search Integration some files could be created; if you are using a module that implements an alternative caching system, some files could be created as well.
sess_write() saves the session ID in the "{sessions}" table, together the value of $user-&gt;cache, the IP address used by the user to connect, and the current timestamp.




db_query("UPDATE {sessions} SET uid = %d, cache = %d, hostname = '%s', session = '%s', timestamp = %d WHERE sid = '%s'", $user-&gt;uid, isset($user-&gt;cache) ? $user-&gt;cache : '', ip_address(), $value, time(), $key);
if (db_affected_rows()) {
  // Last access time is updated no more frequently than once every 180 seconds.
  // This reduces contention in the users table.
  if ($user-&gt;uid &amp;&amp; time() - $user-&gt;access &gt; variable_get('session_write_interval', 180)) {
    db_query("UPDATE {users} SET access = %d WHERE uid = %d", time(), $user-&gt;uid);
  }
}