Re: [tryton] Re: Multiple Tryton server with one back-end DB
Dear All, On Wed, Aug 2, 2017 at 12:41 PM, Cédric Krierwrote: > On 2017-08-02 09:10, Jean Cavallo wrote: > > Hi, > > > > > Is it possible to have multiple Tryton server running on same or > > different machines but connecting to same database? This might help load > > balance and achieve high availability by putting tryton server behind > proxy > > > server! Can also help overcome single-core limitation of Python! > > > > You *will* have cache problems, because default cache is in memory, so > > resets may not be triggered in all server instances. > > Wrong, the cache is reset on all instances: > http://hg.tryton.org/trytond/file/default/trytond/transaction.py#l106 > http://hg.tryton.org/trytond/file/default/trytond/transaction.py#l207 > > But if you know an issue, please fill it on bugs.tryton.org. > > > Consider using > > https://bitbucket.org/pokoli/redis-tryton to solve this. We are using > > multiple tryton instances with an nginx server, so I can confirm it > works. > > This only helps to reduce the memory consumption of each instances which > makes sense if you run many instances on the same host. > But I'm not sure that it is faster than consuming memory on each host > except of maybe if you run a redis server on each hosts to use local > connection but in this case the memory saving should not be that much. > > I am very thankful to all. So, I will first install redis-tryton with my Tryton Server and then user HAProxy for load balancing. -- Regards, Khurram. -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/CAM3N3CzP1f%3DHH1zsEQkYK2zayL2YtH9f-Fh1aEj8x_vLc-03iA%40mail.gmail.com.
Re: [tryton] Re: Multiple Tryton server with one back-end DB
On 2017-08-02 09:10, Jean Cavallo wrote: > Hi, > > > Is it possible to have multiple Tryton server running on same or > different machines but connecting to same database? This might help load > balance and achieve high availability by putting tryton server behind proxy > > server! Can also help overcome single-core limitation of Python! > > You *will* have cache problems, because default cache is in memory, so > resets may not be triggered in all server instances. Wrong, the cache is reset on all instances: http://hg.tryton.org/trytond/file/default/trytond/transaction.py#l106 http://hg.tryton.org/trytond/file/default/trytond/transaction.py#l207 But if you know an issue, please fill it on bugs.tryton.org. > Consider using > https://bitbucket.org/pokoli/redis-tryton to solve this. We are using > multiple tryton instances with an nginx server, so I can confirm it works. This only helps to reduce the memory consumption of each instances which makes sense if you run many instances on the same host. But I'm not sure that it is faster than consuming memory on each host except of maybe if you run a redis server on each hosts to use local connection but in this case the memory saving should not be that much. -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/20170802074145.GB3621%40kei.
Re: [tryton] Re: Multiple Tryton server with one back-end DB
El 02/08/17 a les 09:10, Jean Cavallo ha escrit: Hi, > Is it possible to have multiple Tryton server running on same or different machines but connecting to same database? This might help load balance and achieve high availability by putting tryton server behind proxy > server! Can also help overcome single-core limitation of Python! You *will* have cache problems, because default cache is in memory, so resets may not be triggered in all server instances. Consider using https://bitbucket.org/pokoli/redis-tryton to solve this. We are using multiple tryton instances with an nginx server, so I can confirm it works. We are also using multiple instances with a nginx load balancer in front and with redis-tryton. P.S: redis-tryton is available on pypi too: https://pypi.python.org/pypi/redis_tryton/0.2 -- Sergi Almacellas Abellana www.koolpi.com Twitter: @pokoli_srk -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/b43d688d-6f83-62b2-fc09-1b1b7f2025d6%40koolpi.com.
Re: [tryton] Re: Multiple Tryton server with one back-end DB
Hi, > Is it possible to have multiple Tryton server running on same or different machines but connecting to same database? This might help load balance and achieve high availability by putting tryton server behind proxy > server! Can also help overcome single-core limitation of Python! You *will* have cache problems, because default cache is in memory, so resets may not be triggered in all server instances. Consider using https://bitbucket.org/pokoli/redis-tryton to solve this. We are using multiple tryton instances with an nginx server, so I can confirm it works. Jean Cavallo *Coopengo* -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/CAAc4%2BPbAXeNbWa6h7YEqKO-b1_kEAuZgYm1njVzGA6dbR__Y%2BA%40mail.gmail.com.
[tryton] Re: Multiple Tryton server with one back-end DB
El martes, 1 de agosto de 2017, 15:38:10 (UTC-3), Khurram Shahzad escribió: > > Dear all, > Is it possible to have multiple Tryton server running on same or different > machines but connecting to same database? This might help load balance and > achieve high availability by putting tryton server behind proxy server! Can > also help overcome single-core limitation of Python! > > Regards, > Khurram. > Khurram If all the Tryton server have the exactly same modules, theorically, yes. In the next weeks I am going to try something like that with Raspberry pi. Regards Francisco -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/15896205-bdd2-414c-8635-4c00de7834a6%40googlegroups.com.