# Atenea Exams, an IMS LTI Application to Solve Scalability Problems: A Study Case
## 3 Solution and Results
### A solution to Cope with Scalability Issues in Atenea
#### 3.2.1. Atenea: System Architecture
* If a Moodle instance fails due to a server or software issue, this only affects the courses served by that instance, without affecting the rest of the university. * It allows to assemble machines with modules of educational application developed by third parties, for teaching innovation projects. Moodle has a modular architecture and  
Figure 8: Multi-instance Moodle architecture schema. Figure 9: One single high-performance Moodle instance architecture schema. allows you to extend its functionality with activity modules, course, topics and other extensions. Some of the projects developed internally at the UPC consist of activity modules for teaching innovation projects. These modules can be securely installed on a multi-instance system. However, this option presents several drawbacks:  
* At that time (2004), the UPC had not yet trained enough developers to work with Moodle in such endeavor, and the project to create a multi-instance management software is considered risky. * The processes of integration with academic management (user registration, course registration and grades) become much more complex in a multi-instance system. * Day to day, administration of a multi instance installation can be more complex and demanding of effort. * The developed software must be maintained and updated to work with each new version of Moodle. It is important to update frequently to the latest version for security updates. * At that moment, the university management was implementing a policy of centralizing services of all kinds, and it was not seen as a positive thing to move servers to different campuses. The second option (one single high performance Moodle instance) is based on the implementation of a single instance of Moodle to serve all schools and colleges in the university. This instance runs on 9 servers. Two of these machines act as load balancers. These load balancers route the requests of the web client to all the servers able to satisfy these requests in a way that maximizes the speed, the utilization of the capacity of the systems and guarantees that there is no server with an excess of work, something that can degrade system performance. If a server fails, the load balancer redirects traffic to the remaining online servers. The load balancer performs the following functions:  
* Distributes client requests or network load efficiently across multiple servers. * Ensures high availability and reliability by sending requests only to servers that are online. * Provides the flexibility to add or subtract servers as per demand. One of the load balancers is active, balancing web traffic. While the other is in passive mode, to replace of the other balancer immediately in the event of a service outage. Six machines act as front-end servers, executing Atenea's PHP code according to the requests they receive from the load balancer. These six front-ends (or Application Servers) run the same source code and work on the same network-mounted file system via Networked File System (NFS). This networked, fiber-optic shared file system is mounted in a high-performance disk cabinet, with cache, backup-restore, and hot disk replacement systems. Finally, all front-ends share the same PostgreSQL database management system, which runs on an optimized server and manages the transactions of the six servers. It is important to remember that in 2004 when we talk about servers we are still talking about physical machines, not virtualized or cloud servers. The advantages of this configuration were, at that time:  
* Load testing proves that this architecture worked and fully supports performance requirements. * The integration of the system with the academic management system (user registration, course registration and sending notes) is much simpler with a single instance of Moodle. * UPCnet already has the expert technical staff to configure and manage complex server architectures. * The policy of the university management is favorable to a single instance that integrates the service to the whole university.