[OpenSIPS-Devel] Location table structure - account_contact_idx
    Liviu Chircu 
    liviu at opensips.org
       
    Wed Oct  2 04:15:08 EDT 2019
    
    
  
Hey Donat,
Could you paste your usrloc/registrar module settings?  The first thing 
I'm trying
to establish is whether you considered the sql_write_mode [1] setting 
when implementing
the requirements of your platform.
Depending on your server restart policy and frequency, the optimal 
solution could simply
be to switch to "write-back" (i.e. async MySQL operations), which would 
help scale
your registration throughput by at least an order of magnitude.
Best Regards,
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 30.09.2019 16:26, Donat Zenichev wrote:
> Seems I found a way out:
>
> I added 'contact_id' primary key into a list of sources columns for an 
> unique key, so now it looks as following:
>   PRIMARY KEY (`contact_id`),
>   UNIQUE KEY `account_contact_idx` 
> (`username`,`domain`,`contact`,`callid`,`contact_id`)
>
> It didn't increase the loading on the CPU that much, but now I have:
> - absence of duplicate entries (that were causing 1032 errors when 
> failing over to slave side)
> - pretty nice capacity, as I had with usual 'account_contact_idx' 
> (that was without 'contact_id' PK)
>
> But currently I have some doubts that this will cause some 
> unpredictable behavior.
> MySQL gurus, any insight on this?
    
    
More information about the Devel
mailing list