Comments (4)
Hi @devendermishra!
Yes, Acra server works well with horizontal scaling.
Acra has the whole sections in the docs regarding optimisation, which includes vertical and horizontal scaling:
https://docs.cossacklabs.com/acra/configuring-maintaining/optimizations/
Acra also has the Balancer demo with AcraServer, PostgreSQL and HAProxy which demostrates different combination: balancer before the databases, or balancer before AcraServers
https://github.com/cossacklabs/acra-balancer-demo
Hope it helps!
from acra.
Thanks @vixentael for prompt response. My question is related to MySQL 8 based clients. Currently, MySQL 8 client is not supported. However, acra needs to store the capability of connected client. How that will work in case of horizontal scaling?
from acra.
In the given demo, there is 1 acra server per DB. I want to know if we can have multiple acra server per DB (especially MySQL).
from acra.
My question is related to MySQL 8 based clients. Currently, MySQL 8 client is not supported.
However, acra needs to store the capability of connected client.
For now, Acra doesn't store it. Your balancers should park the same client's connection to the same AcraServer and AcraServer will use the same database. Database wire protocols are stateful and operate with client sessions. Every session has its own set of registered prepared statements, opened transactions, connection parameters, db variables, and so on. So, the same client's connection should be proxied to the same database that handle that connection. You can scale your infrastructure by X database instances and every instance should have own AcraServer instance.
In the given demo, there is 1 acra server per DB. I want to know if we can have multiple acra server per DB (especially MySQL).
Yes, you can. But it depends on how your apps will connect to the AcraServer/Database. Let's use next example. You have a service parallelized into 2 instances and it uses a pool of connections of size 2. How you will distribute connection between different AcraServers?
- You can configure every instance to use different instances of AcraServer. First intance uses AcraServerA, the second uses AcraServerB. Or every odd app instance uses AcraServerA and other uses AcraServerB.
- You can configure your apps to connect to the AcraServer by it's domain name and DNS record will have X IP addresses of AcraServer instances. If your db drivers in app support round-robin strategy - then it will be scaled. If they will use only the first IP - it will not be scaled. Depends on db driver on app side or you need to write your own logic. In such case, the same instance can have 2 connections routed to 2 different AcraServer instances.
- You can use any TCP proxy (for example haproxy) that will route connections from the app to different AcraServers using round-robin or any other strategy - it will work. One connection will use own AcraServer instance until close. AcraServer will store the connection state until it closes. In this case, 2 different instances can have 2 connections routed by proxy to 2 different AcraServer instances.
from acra.
Related Issues (20)
- [ISSUE] Using Acra as proxy/encryptor with rails app fails to encrypt HOT 4
- [ISSUE] Acra throws errors on tables with columns wrapped with double quotes HOT 3
- [ISSUE] Acra replaces null values by an empty string when using prepared statements HOT 3
- [ISSUE] tls_ocsp_from_cert: ignore doesn't ignore database OCSP, undocumented behaviour HOT 4
- Clarification on replacement of Zones HOT 2
- [ISSUE] Tokenization in MariaDB HOT 2
- Question HOT 2
- [ISSUE] "Error 2006: MySQL server has gone away" while executing mysqli prepared statements HOT 1
- [ISSUE] PAN masking does not meet the PCI SSC requirements HOT 1
- Question about AcraCensor: SQL query without "FROM" HOT 2
- Question about poison records HOT 7
- Online SQL grammar editor/tester
- Ask: How to use Masking? HOT 3
- [ISSUE] Encryption Not working HOT 4
- [ISSUE]Reducing overhead HOT 3
- [ISSUE]Supported MySQL Versions HOT 2
- [ISSUE] Index on encrypted column HOT 1
- [ISSUE]Facing lot of "use of closed network connection" error HOT 2
- What should be the approach to supporting Microsoft SQL Server and Oracle? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acra.