• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.4.3 Latest
Buy Hosting
vinuV

vinu

@vinu
About
Posts
12
Topics
2
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

    Scaling on 1.16.x requires redis - how to configure?
  • vinuV vinu

    @TonyTony
    Make sure you have updated in the nodebb configuration with the property

    "isCluster": true
    

    When you use auto sclaing(HPA) of NodeBB, this is must. Otherwise you will end with lot of inconsistency in the API responses.

    Note: This property will help if you use on Redis as your DB(not with the conbination of Mongo+Redis)

    Thanks for the details mentioned in this post
    https://community.nodebb.org/topic/15517/nodebb-mongodb-scaling-k8s/16


  • NodeBB Pods non response after dumping 12 lack data using jmeter scripts
  • vinuV vinu

    @volanar Thans for the suggestion. After switching to Postgres we are still not getting the better troughput than redis.

    @julian Is it possibl to share the any benchmark results of MongoDB.

    The only option we have now to go with redis(RDB + AOF) with the above results shared by @venkat123 here
    https://community.nodebb.org/post/84368

    Any suggestions on MongoDB, Redis or Postgress config setting to get better performance.


  • NodeBB Pods non response after dumping 12 lack data using jmeter scripts
  • vinuV vinu

    @julian Thanks for the quick response.

    Any suggestions about MongoDB perforamance tunining? Especially for wirte operations?

    We Just tried using both Mongo & Redis, but we have noticed redis is only used to manage user sessions.

    Can we expect better performance, if we switch to Redis instead of MangoDB?

    Hope out team also faced these kind of issues which doing NodeBB benchmarking. Please share if you have any references.


  • NodeBB Pods non response after dumping 12 lack data using jmeter scripts
  • vinuV vinu

    We are trying to indentify the NodeBB benchmark for Sunbird Platform

    We are expecting 1200 to 1500 tps for the below infra(specifications)

    NodeBB pods => HPA(autoscaling) from min 2 to 20 pods(each pod 1 core with 1GB memory)
    MongoDB => 16 cores with 32GB memory

    We noticed all userslug api's & topic related POST api's are very low performance.

    We have also noticed For topic create API CPU utilisation of mongod is reaching 100% for 32 cores mongo mechine.

    Find the below MongoDB load over 24 hrs
    7c17d80d-1133-4506-8e9a-f5842c3e7f46-image.png

    Fing the below snapshot of NodeBB load for

    • Topic create API

    • Topic read API's

    With cocurrency 10 & 100
    ce3df3aa-962f-4b2c-a08c-02b5e65679a0-image.png

    Below is the snapshot of API's throuhput & other details of Jemeter script output

    b4ca8bf0-b56d-4792-bf3a-512ee277b7c4-image.png

    Any suggestions/reason why Topic create API is taking 100% CPU usage?


  • Nodebb benchmarking userslug api issues
  • vinuV vinu

    @pitaj

    Environment setup details
    NodeBB => 12 Pods(each pod of 4GB RAM)
    MondeDB => 1pod(4 core machine)

    We are using NodeBB in "Sunbird platform". While we do benchmark of NodeBB API's, we have noticed this issue.

    Most of the {userslug} API's are not performaing well(throughput around 140) as metioned by @venkat123 in the above thread.

    /api/user/venkat123
    /api/user/venkat123/upvoted
    /api/user/venkat123/downvoted
    

    Where as Category read API's are performing well. We are alble to get better through put around 1200.

    /api/category/:cid
    

  • Couldn't set default admin username and password in config.json
  • vinuV vinu

    @pitaj Not sure what is the valid JSON to be added here.

    As per @baris comment as commented above, I started using json by escaping.

    I am using below JSON. Please correct me how can we use the below JSON in setup command

    {
        "url": "http://0.0.0.0:4567",
        "secret": "123456-eb70-4605-kkerg-720752bc4aca",
        "setup": {
            "admin:username": "adminvsv",
            "admin:password": "Password@123",
            "admin:password:confirm": "Password@123",
            "admin:email": "[email protected]"
        },
        "database": "mongo",
        "mongo": {
            "host": "127.0.0.1",
            "port": "27017",
            "username": "",
            "password": "",
            "database": "nodebb"
        }
    }
    

  • Couldn't set default admin username and password in config.json
  • vinuV vinu

    @pitaj I am getting

    vinu@tilap330-vinu:~/Projects/nodebb$ node app --setup="{\\\"url\\\":\\\"http:\\/\\/localhost:4567\\\",\\\"secret\\\":\\\" 92b094a0-f72b-45d9-9640-243de540012d\\\",\\\"database\\\":\\\"mongo\\\",\\\"port\\\":\\\"4567\\\",\\\"mongo\\\":{\\\"host\\\":\\\"127.0.0.1\\\",\\\"port\\\":27017,\\\"username\\\":\\\"\\\",\\\"password\\\":\\\"\\\",\\\"database\\\":\\\"nodebb\\\",\\\"uri\\\":\\\"mongodb:\\/\\/11.2.3.75:27017\\\"},\\\"setup\\\":{\\\"admin:username\\\":\\\"admin_vsv\\\",\\\"admin:password\\\":\\\"Password@1\\\",\\\"admin:password:confirm\\\":\\\"Test@123\\\",\\\"admin:email\\\":\\\"[email protected]\\\"}}"
    2021-01-06T16:45:09.311Z [undefined/31941] - info: NodeBB v1.13.3 Copyright (C) 2013-2021 NodeBB Inc.
    2021-01-06T16:45:09.312Z [undefined/31941] - info: This program comes with ABSOLUTELY NO WARRANTY.
    2021-01-06T16:45:09.313Z [undefined/31941] - info: This is free software, and you are welcome to redistribute it under certain conditions.
    2021-01-06T16:45:09.313Z [undefined/31941] - info: 
    2021-01-06T16:45:09.646Z [31941] - info: NodeBB Setup Triggered via Command Line
    
    Welcome to NodeBB v1.13.3!
    
    This looks like a new installation, so you'll have to answer a few questions about your environment before we can proceed.
    Press enter to accept the default setting (shown in brackets).
    2021-01-06T16:45:09.650Z [31941] - error: Invalid json in nconf.get('setup'), ignoring setup values
    URL used to access this NodeBB (http://localhost:4567) (node:31941) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
    (Use `node --trace-warnings ...` to show where the warning was created)
    
    

  • Couldn't set default admin username and password in config.json
  • vinuV vinu

    @baris
    Thanks for your quick response.

    I tried the below command

    ./nodebb app --setup="{\\\"url\\\":\\\"http:\\/\\/localhost:4567\\\",\\\"secret\\\":\\\" 92b094a0-f72b-45d9-9640-243de540012d\\\",\\\"database\\\":\\\"mongo\\\",\\\"port\\\":\\\"4567\\\",\\\"mongo\\\":{\\\"host\\\":\\\"127.0.0.1\\\",\\\"port\\\":27017,\\\"username\\\":\\\"\\\",\\\"password\\\":\\\"\\\",\\\"database\\\":\\\"nodebb\\\",\\\"uri\\\":\\\"mongodb:\\/\\/11.2.3.75:27017\\\"},\\\"setup\\\":{\\\"admin:username\\\":\\\"admin_vsv\\\",\\\"admin:password\\\":\\\"Password@1\\\",\\\"admin:password:confirm\\\":\\\"Test@123\\\",\\\"admin:email\\\":\\\"[email protected]\\\"}}"
    2021-01-06T15:38:22.528Z [24887] - info: Launching web installer on port 4567
    2021-01-06T15:38:24.048Z [24887] - info: Web installer listening on http://0.0.0.0:4567
    

    I got stuck at web installer. We have to manually feed the information again in web page http://0.0.0.0:4567

    But our requirement is we should able to setup through jenkins command shell.

    @PitaJ @julian


  • Couldn't set default admin username and password in config.json
  • vinuV vinu

    @pitaj

    I have tried using the above command, but not succeeded..

    ./nodebb setup '{"url":"http://localhost:4567","secret":" 92b094a0-f72b-45d9-9640-243de540012d","database":"mongo","port":"4567","mongo":{"host":"127.0.0.1","port":27017,"username":"","password":"","database":"nodebb","uri":"mongodb://11.2.3.75:27017"},"setup":{"admin:username":"admin_vsv","admin:password":"Password@1","admin:password:confirm":"Test@123","admin:email":"[email protected]"}}'
    2021-01-06T10:44:19.246Z [6623] - info: NodeBB Setup Triggered via Command Line
    
    Welcome to NodeBB v1.13.3!
    
    This looks like a new installation, so you'll have to answer a few questions about your environment before we can proceed.
    Press enter to accept the default setting (shown in brackets).
    2021-01-06T10:44:19.253Z [6623] - error: Invalid json in nconf.get('setup'), ignoring setup values
    2021-01-06T10:44:19.254Z [6623] - error: Required values are missing for automated setup:
    2021-01-06T10:44:19.254Z [6623] - error:   admin:username
    2021-01-06T10:44:19.254Z [6623] - error:   admin:password
    2021-01-06T10:44:19.255Z [6623] - error:   admin:password:confirm
    2021-01-06T10:44:19.255Z [6623] - error:   admin:email
    
    

  • Getting logged in user token
  • vinuV vinu

    @julian said in Getting logged in user token:

    _uid

    Thanks for the quick response. Really appreciate the way you are responding to the user queries.

    I am using point 2 to generate a token for the logged-in user using the master token.

    curl --location --request POST 'http://localhost:4567/api/v1/users/2/tokens?_uid=2' \
    --header 'Authorization: Bearer 840b285b-dee8-44d9-802d-a2cc0057e3ab' \
    --header 'Authentication: Bearer 840b285b-dee8-44d9-802d-a2cc0057e3ab' \
    

    response

    {
        "code": "ok",
        "payload": {
            "token": "a02c1803-9b8e-444e-892f-fef5d4ac257b"
        }
    }
    

    This is working fine to get the token for a specific user. Once I get the token for the logged-in user, I am using the above response token in the further API request header as below.

    curl --location --request GET 'http://localhost:3002/discussion/category/8?_uid=a02c1803-9b8e-444e-892f-fef5d4ac257b' \
    --header 'Authorization: Bearer a02c1803-9b8e-444e-892f-fef5d4ac257b' \
    --header 'Authentication: Bearer a02c1803-9b8e-444e-892f-fef5d4ac257b' \
    --data-raw ''
    

    But I am getting error as SESSION_EXPIRED(even though the user is logged-in in different browser)

    {
        "id": "app.error",
        "ver": "1.0",
        "ts": "2020-12-30 09:16:22:415+0530",
        "params": {
            "msgid": null,
            "status": "failed",
            "err": "SESSION_EXPIRED",
            "errmsg": "Session Expired"
        },
        "responseCode": "SESSION_EXPIRED",
        "result": {}
    }
    

  • Getting logged in user token
  • vinuV vinu

    @pitaj
    No. Custom UI is communicating with our nodeJS middleware application. From our nodeJS middleware application, we are using NodeBB read & write API's.

    Our application requirement is only logged-in users should able to participate in the discussions. To handle the session & secure the NodeBB write & read API's we are routing through our nodeJS middleware.

    Discusion architecture
    We are auto-creating the users in NodeBB when user logged-in to our application with Email & auto-login to NodeBB. So we need login user session details for further APIs to show/hide some of feature like

    1. Can create topic
    2. Can we specific categories
    3. Can reply to post on specific categories

    @rayulu-villa


  • Getting logged in user token
  • vinuV vinu

    We are using cutom UI(for front-end) & own middleware to communicate with nodebb API's.

    When the user is logged in, we are using nodebb-write-api to register or login the user into nodebb.

    But any further request from middleware should carry the nodebb logged in user info in the request header by sending the logged-in user token.

    We found some reference from below
    https://github.com/NodeBB/nodebb-plugin-write-api/issues/63

    Please suggest how to get logged in user token, so that we will store that token in middleware session. Any request going through middleware will read the session info to get nodebb logged-in user token & upend to every request header.

  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
  • Login

  • Don't have an account? Register

  • Login or register to search.