Code Monkey home page Code Monkey logo

Comments (2)

ArtDu avatar ArtDu commented on August 29, 2024

It can be fixed after merging this PR #438 . But need to be tested.

@seet61 can you give more details about requests?
what types of requests?
how many of them? what is the ~packet size?
Do you use ProxyTarantoolClient? If you then how many connections between client and cluster?

It could help to reproduce this behavior.

from cartridge-java.

seet61 avatar seet61 commented on August 29, 2024

@ArtDu thanks, I will be waiting of them.

My project use tarantool cartridge claster for caching huge responses of master system, SOAP responses from 10kB to 5 MB.
Current storage of cluster is 12 routers at 12 VM and 2 VM with 6 replica set of storages.

I'm using TarantoolClient from docs example

    private List<TarantoolServerAddress> getShuffledTarantoolServerAddresses() {
        List<TarantoolServerAddress> addresses = tarantoolConfiguration.getRouters().stream()
                .map(router -> new TarantoolServerAddress(router.split(":")[0], Integer.parseInt(router.split(":")[1])))
                .collect(Collectors.toList());
        log.debug("addresses: " + addresses);
        Collections.shuffle(addresses);
        return addresses;
    }

    @Bean
    public TarantoolClient<TarantoolTuple, TarantoolResult<TarantoolTuple>> tarantoolClient() {
        return TarantoolClientFactory.createClient()
                // You can connect to multiple routers
                // Do not forget to shuffle your addresses if you are using multiple clients
                .withAddresses(getShuffledTarantoolServerAddresses())
                // For connecting to a Cartridge application,
                // use the value of cluster_cookie parameter in the init.lua file
                .withCredentials(tarantoolConfiguration.getUserName(), tarantoolConfiguration.getUserPassword())
                // Number of connections per Tarantool instance
                .withConnections(tarantoolConfiguration.getConnectCount())
                // Specify using the default CRUD proxy operations mapping configuration
                .withProxyMethodMapping()
                .withConnectionSelectionStrategy(PARALLEL_ROUND_ROBIN)
                .withRetryingByNumberOfAttempts(3)
                /*.withRetryingByNumberOfAttempts(5, throwable -> throwable.getMessage().equals("Some error"),
                        policy -> policy.withDelay(500))*/
                .withConnectTimeout(tarantoolConfiguration.getConnectTimeout())
                .withReadTimeout(tarantoolConfiguration.getReadTimeout())
                .withRequestTimeout(tarantoolConfiguration.getRequestTimeout())
                .build();
    }

Each client initialise 10 connection to each router.
If you need additional information you could send me a message at tg by nickname.

from cartridge-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.